Skip to content

Commit

Permalink
ui: fix type error on build
Browse files Browse the repository at this point in the history
Signed-off-by: pamfilos <[email protected]>
  • Loading branch information
pamfilos committed Sep 16, 2024
1 parent 67edc20 commit 6f3b157
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion ui/src/components/search/CheckboxFacet.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const CheckboxFacet: React.FC<CheckboxFacetProps> = ({

const createQueryString = useCallback(
(name: string, value: any) => {
const params = new URLSearchParams(searchParams)
const params = new URLSearchParams(searchParams.toString())

params.delete(name);
params.delete("page");
Expand Down
2 changes: 1 addition & 1 deletion ui/src/components/search/SearchPagination.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ const SearchPagination: React.FC<SearchPagination> = ({ count, params }) => {
const currentPage = searchParams.get("page") || 1

const onPageChange = (page: number) => {
const params = new URLSearchParams(searchParams)
const params = new URLSearchParams(searchParams.toString())
params.set("page", `${page}`);

router.push(pathname + (params.toString() ? `?${params.toString()}` : ''));
Expand Down
4 changes: 2 additions & 2 deletions ui/src/components/search/YearFacet.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ const YearFacet = ({ data }: any) => {

const createQueryString = useCallback(
(name: string, value: any) => {
const params = new URLSearchParams(searchParams)
const params = new URLSearchParams(searchParams.toString())

params.delete(name);
params.delete("page");
Expand Down Expand Up @@ -80,7 +80,7 @@ const YearFacet = ({ data }: any) => {
const onBarMouseOut = () => setHoveredBar(null);

const resetFilters = () => {
const params = new URLSearchParams(searchParams);
const params = new URLSearchParams(searchParams.toString());
params.delete('publication_year__range');
params.delete('page');
router.push(pathname + (params.toString() ? `?${params.toString()}` : ""))
Expand Down

0 comments on commit 6f3b157

Please sign in to comment.