From 5c123f288730028e005dd2b75188cb4a6dfa24ec Mon Sep 17 00:00:00 2001 From: pamfilos Date: Tue, 12 Nov 2024 14:53:49 +0100 Subject: [PATCH] search: fix year filtering (typescript fix) Signed-off-by: pamfilos --- ui/src/components/search/YearFacet.tsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ui/src/components/search/YearFacet.tsx b/ui/src/components/search/YearFacet.tsx index ca5196423..1ebdcef34 100644 --- a/ui/src/components/search/YearFacet.tsx +++ b/ui/src/components/search/YearFacet.tsx @@ -5,7 +5,6 @@ import { useRouter, usePathname, useSearchParams } from "next/navigation"; import "react-vis/dist/style.css"; import { PublicationYear, YearFacetData } from "@/types"; -import { URLSearchParams } from "url"; const mapInitialDataToYears = ( @@ -34,7 +33,7 @@ const YearFacet = ({ data }: any) => { setInitialEndpoints(getSliderEndpoints(initialData)); }, [data]); - const resolveYearQuery = (name: string, params: URLSearchParams, range: number[]) => { + const resolveYearQuery = (name: string, params: any, range: number[]) => { if (range[0] === range[1]) { params.set(`${name}__gte`, range[0]?.toString()+"-01-01") params.set(`${name}__lte`, range[0]?.toString()+"-12-31")