diff --git a/src/components/campaign/shell/MunicipalityNavSavedFilters.tsx b/src/components/campaign/shell/MunicipalityNavSavedFilters.tsx index ac4675a7..129f2746 100644 --- a/src/components/campaign/shell/MunicipalityNavSavedFilters.tsx +++ b/src/components/campaign/shell/MunicipalityNavSavedFilters.tsx @@ -3,7 +3,6 @@ import { Trash2Icon } from 'lucide-react' import Link from 'next/link' import { usePathname, useSearchParams } from 'next/navigation' -import { useId } from 'react' import { toast } from 'sonner' import { useMunicipalitySavedFilters } from '@/components/campaign/shared/useMunicipalitySavedFilters' @@ -34,7 +33,6 @@ export const MunicipalityNavSavedFilters = ({ onNavigate }: { onNavigate: () => const savedFilters = useMunicipalitySavedFilters() const pathname = usePathname() const searchParams = useSearchParams() - const listId = useId() const query = searchParams.toString() const currentHref = query ? `${pathname}?${query}` : pathname @@ -49,10 +47,13 @@ export const MunicipalityNavSavedFilters = ({ onNavigate }: { onNavigate: () => //
and strand a keyboard user at the top of the page. Resolve the // survivor BEFORE the removal: emptying the group unmounts this whole // component, so the fallback has to be the nav link. + const menuItem = row?.closest('[data-sidebar="menu-item"]') const successor = savedFilters.length > 1 - ? row?.querySelector