"use client"; import { usePathname } from "next/navigation"; /* The console's left rail: where you are, who you are, and the way out. Plain anchors rather * than Next links on purpose — every page under /ops is force-dynamic and behind a cookie, and a * prefetched copy fetched before a state change would be the stale one. */ const NAV = [ { href: "/ops", label: "Overview" }, { href: "/ops/facilities", label: "Facilities" }, { href: "/ops/controls", label: "Controls" }, { href: "/ops/security", label: "Your sign-in" }, ]; export function Rail({ name, email, role, viaSso, totpEnabled }: { name: string; email: string; role: string; viaSso: boolean; totpEnabled: boolean }) { const path = usePathname() || "/ops"; const active = (href: string) => (href === "/ops" ? path === "/ops" : path.startsWith(href)); return ( ); }