import { Link, useLocation } from 'react-router'; import { getAllRoutes } from './router-utils'; import { useState } from 'react'; export default function NavigationMenu() { const [isOpen, setIsOpen] = useState(false); const location = useLocation(); const isActive = (path: string) => location.pathname === path; const toggleMenu = () => setIsOpen(!isOpen); const navigationRoutes: { path: string; label: string }[] = getAllRoutes() .filter( route => route.handle?.showInNavigation === true && route.fullPath !== undefined && route.handle?.label !== undefined ) .map( route => ({ path: route.fullPath, label: route.handle?.label, }) as { path: string; label: string } ); return ( ); }