import { useAuth } from "@/util/auth"; import { Stack, NavLink } from "@mantine/core"; import { Link, useLocation } from "@remix-run/react"; import { IconBook2, IconLogout, IconPlaneDeparture, IconUser, } from "@tabler/icons-react"; export default function Navbar({ opened, toggle, }: { opened: boolean; toggle: () => void; }) { const location = useLocation(); const page = location.pathname.split("/")[2]; const { user, signout } = useAuth(); return ( } active={page == null} onClick={() => (opened ? toggle() : null)} /> } active={page === "flights"} onClick={() => (opened ? toggle() : null)} /> } > } /> signout()} label="Sign Out" leftSection={} /> ); }