diff --git a/frontend/src/app/[locale]/look/SearchOpportunityStatus.tsx b/frontend/src/app/[locale]/look/SearchOpportunityStatus.tsx index dc5570f3ac..f799cf651c 100644 --- a/frontend/src/app/[locale]/look/SearchOpportunityStatus.tsx +++ b/frontend/src/app/[locale]/look/SearchOpportunityStatus.tsx @@ -16,7 +16,7 @@ interface StatusOption { } interface SearchOpportunityStatusProps { - selectedStatuses: string; + selectedStatuses: Set; } const statusOptions: StatusOption[] = [ @@ -36,7 +36,9 @@ export default function SearchOpportunityStatus({ selectedStatuses }: SearchOppo const searchParams = useSearchParams() || undefined; const pathname = usePathname() || ""; const router = useRouter(); - const statuses = selectedStatuses ? selectedStatuses.split(",") : []; + const statuses = Array.from(selectedStatuses).join(","); + + // console.log(Array.from(selectedStatuses).join(","), statuses) const updateAll = (statusValue: string, isChecked: boolean) => { const params = new URLSearchParams(searchParams); diff --git a/frontend/src/app/[locale]/look/page.tsx b/frontend/src/app/[locale]/look/page.tsx index 513bc7819b..c7aead9957 100644 --- a/frontend/src/app/[locale]/look/page.tsx +++ b/frontend/src/app/[locale]/look/page.tsx @@ -13,6 +13,7 @@ import Loading from "src/app/[locale]/search/loading"; import SearchResultsList from "./SearchResultList"; import QueryProvider from "./QueryProvider"; import SearchOpportunityStatus from "./SearchOpportunityStatus"; +import { convertSearchParamsToProperTypes } from "src/utils/search/convertSearchParamsToProperTypes"; export async function generateMetadata() { const t = await getTranslations({ locale: "en" }); @@ -34,8 +35,11 @@ export default function Look({ }) { unstable_setRequestLocale("en"); const t = useTranslations("Process"); - const query = searchParams?.query || ''; - const statuses = searchParams?.status || ''; + const key = searchParams.toString() + const convertedSearchParams = convertSearchParamsToProperTypes(searchParams); + + const query = convertedSearchParams?.query || ''; + const statuses = convertedSearchParams?.status || ''; return ( <> @@ -53,7 +57,7 @@ export default function Look({
- }> + }>