import { Link } from "../../components/Link"; import { usePageContext } from "vike-react/usePageContext"; const navSections = [ { items: [{ href: "/docs", label: "Overview" }], }, { heading: "Plugins", items: [ { href: "/docs/registry", label: "Overview" }, { href: "/docs/plugin-authoring", label: "Authoring Guide" }, ], }, { heading: "Flashing", items: [ { href: "/docs/esp32", label: "ESP32" }, { href: "/docs/nRF52", label: "nRF52" }, ], }, ]; function NavLink({ href, label }: { href: string; label: string }) { const pageContext = usePageContext(); const { urlPathname } = pageContext; const isActive = href === "/docs" ? urlPathname === href : urlPathname.startsWith(href); return ( {label} ); } export default function Layout({ children }: { children: React.ReactNode }) { return (