import { AppShell, ScrollArea, Stack, Group, Paper, useMantineColorScheme } from "@mantine/core"; import { Link } from "@tanstack/react-router"; import { NavLink } from "./nav-link"; import { useIsMobile } from "@/hooks/use-is-mobile"; import { useAuth } from "@/contexts/auth-context"; import { useLinks } from "../hooks/use-links"; import { memo } from "react"; const Navbar = () => { const { user, roles } = useAuth() const isMobile = useIsMobile(); const { colorScheme } = useMantineColorScheme(); const links = useLinks(user?.id, roles); const isDark = colorScheme === 'dark'; const borderColor = isDark ? 'var(--mantine-color-dimmed)' : 'black'; const boxShadowColor = isDark ? 'var(--mantine-color-dimmed)' : 'black'; // boxShadow: `5px 5px ${boxShadowColor}`, borderColor if (isMobile) return ( {links.map((link) => ( ))} ) return {links.map((link) => ( ))} } export default memo(Navbar);