"use client" import Link from "next/link" import { usePathname } from "next/navigation" import { ExternalLink } from "lucide-react" const links = [ { href: "/", label: "Search" }, { href: "/chat", label: "Agent" }, { href: "/docs", label: "API Docs" }, ] export function NavLinks() { const pathname = usePathname() return (
{links.map(({ href, label }) => { const isActive = href === "/" ? pathname === "/" : pathname.startsWith(href) return ( {label} ) })} {/* Status page is hosted independently (GitHub Pages) so it survives outages of this app — industry best practice (cf. githubstatus.com) */} Status
) }