"use client"; import { useState } from "react"; import Link from "next/link"; import { usePathname } from "next/navigation"; import { ThemeToggle } from "./theme-toggle"; import { Search } from "./search"; import { Sheet, SheetTrigger, SheetContent, SheetTitle, } from "@/components/ui/sheet"; import { cn } from "@/lib/utils"; const navLinks = [ { href: "/playground", label: "Playground" }, { href: "/examples", label: "Examples" }, { href: "/docs", label: "Docs" }, ]; function GitHubLink({ className }: { className?: string }) { return ( 12k ); } export function Header() { const pathname = usePathname(); const [mobileOpen, setMobileOpen] = useState(false); const isActive = (href: string) => { if (href === "/playground") { return pathname === "/playground"; } if (href === "/examples") { return pathname.startsWith("/examples"); } if (href === "/docs") { return pathname.startsWith("/docs"); } return false; }; return (
json-render
{/* Desktop nav */} {/* Mobile nav */}
Menu
); }