import { useState } from "react"; import { Link, useLocation } from "react-router"; import { Sheet, SheetContent, SheetHeader, SheetTitle, SheetTrigger, } from "~/components/ui/sheet"; import { Button } from "~/components/ui/button"; import { authClient } from "~/lib/auth-client"; import { UserMenu } from "~/components/UserMenu"; import { HelpCircle, MenuIcon, Settings } from "lucide-react"; import logoUrl from "../../public/logo.svg?url"; interface NavbarProps { isAdmin: boolean; } export function Navbar({ isAdmin }: NavbarProps) { const [open, setOpen] = useState(false); const location = useLocation(); const { data: session } = authClient.useSession(); const signInHref = `/login?redirectTo=${encodeURIComponent(location.pathname)}`; const authSection = session ? ( ) : ( Sign In ); return ( {/* Left: Logo + Nav links */} How To Play Rules {/* Desktop Right: Support + Admin icons + Auth */} {isAdmin && ( )} {authSection} {/* Mobile: icons + Auth + Hamburger */} {isAdmin && ( )} {authSection} Menu setOpen(false)} > How To Play setOpen(false)} > Rules ); }