From 17ab80cac9d612e56b5b049cd8999e32dae664dc Mon Sep 17 00:00:00 2001 From: Owen Date: Tue, 9 Dec 2025 16:47:18 +0100 Subject: [PATCH] fix types --- src/app/[locale]/(main)/match/MatchForm.tsx | 1 - src/app/[locale]/(main)/match/components/TeamSelection.tsx | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/app/[locale]/(main)/match/MatchForm.tsx b/src/app/[locale]/(main)/match/MatchForm.tsx index 6510f4d..a42e76b 100644 --- a/src/app/[locale]/(main)/match/MatchForm.tsx +++ b/src/app/[locale]/(main)/match/MatchForm.tsx @@ -2,7 +2,6 @@ import { zodResolver } from "@hookform/resolvers/zod"; import { FormProvider, useForm } from "react-hook-form"; -import Select from "react-select"; import { z } from "zod"; import TeamSelection from "@/app/[locale]/(main)/match/components/TeamSelection"; diff --git a/src/app/[locale]/(main)/match/components/TeamSelection.tsx b/src/app/[locale]/(main)/match/components/TeamSelection.tsx index 48f364a..c0faf8c 100644 --- a/src/app/[locale]/(main)/match/components/TeamSelection.tsx +++ b/src/app/[locale]/(main)/match/components/TeamSelection.tsx @@ -21,7 +21,7 @@ interface IProps { clubOptions: { value: string; label: string; - url: string; + url: string | undefined; }[]; } @@ -42,7 +42,7 @@ const TeamSelection = ({ name, label, clubOptions }: IProps) => { }); const selectedOption = clubOptions.find((c) => c.value === selectedDbId); - const selectedId = selectedOption?.url.split("=").pop(); + const selectedId = selectedOption?.url?.split("=").pop(); useEffect(() => { const fetchPlayers = async () => {