diff --git a/src/components/bookmark/BookmarksListControls.tsx b/src/components/bookmark/BookmarksListControls.tsx index 85aaf67..da74d5e 100644 --- a/src/components/bookmark/BookmarksListControls.tsx +++ b/src/components/bookmark/BookmarksListControls.tsx @@ -9,6 +9,7 @@ export const BookmarksListControls = ({ linkCount, }: { linkCount: number } & PropsWithChildren) => { const searchParams = useSearchParams(); + const params = new URLSearchParams(searchParams); const path = usePathname(); let [isPending, startTransition] = useTransition(); const { replace } = useRouter(); @@ -16,7 +17,6 @@ export const BookmarksListControls = ({ const handleCheckboxChange = () => { if (!searchParams) return; - const params = new URLSearchParams(searchParams); if (params.get('all') === 'true') { params.delete('all'); } else { @@ -28,6 +28,8 @@ export const BookmarksListControls = ({ }); }; + if (params?.get('search') && !linkCount) return null; + return (