"use client"; import Link from "next/link"; import { usePathname } from "next/navigation"; import { useState } from "react"; const NAV_LINKS = [ { href: "/", label: "Home" }, { href: "/playground", label: "Playground" }, { href: "/benchmarks", label: "Benchmarks" }, { href: "/explorer", label: "Graph Explorer" }, { href: "/architecture", label: "Architecture" }, { href: "/docs", label: "Docs" }, ]; export function Navbar() { const pathname = usePathname(); const [mobileOpen, setMobileOpen] = useState(false); return ( <> {/* Mobile Menu */} {mobileOpen && (
{NAV_LINKS.map((link) => { const isActive = pathname === link.href; return ( setMobileOpen(false)} className={`nav-link text-lg py-3 ${isActive ? "nav-link-active" : ""}`} > {link.label} ); })}
⭐ GitHub
)} ); }