/** * Nav — the docs sidebar. * * Client component so it can highlight the active route via usePathname. Reads * its structure from lib/nav.ts (the single source of truth) and renders one * labelled group per NavSection. */ "use client"; import Link from "next/link"; import { usePathname } from "next/navigation"; import { NAV } from "../lib/nav"; function isActive(pathname: string, href: string): boolean { if (href === "/") return pathname === "/"; return pathname === href || pathname.startsWith(`${href}/`); } export function Nav() { const pathname = usePathname(); return ( ); } export default Nav;