"use client"; import { useState } from "react"; import Link from "next/link"; import { MenuIcon } from "lucide-react"; import { Button } from "yt-dlp-transcript-common/components/ui/button"; import { Sheet, SheetClose, SheetContent, SheetTitle, SheetTrigger, } from "yt-dlp-transcript-common/components/ui/sheet"; // The narrow half of the masthead: the NAV. Below `lg` the header's bar keeps // the brand, the social row, the theme toggle and this trigger; the nav's // links (five or more do not fit a phone's or a tablet's bar beside the group) // move in here, with the link to the Archilyzer home's official instances // after them on a site (the bar shows both inline from `lg`). Nothing else: // the theme is the bar's toggle, the sibling sites are the footer's, and // Changelog is in the footer. // // Header is a server component, so the links arrive as plain serialisable // props. export default function MobileMenu({ links, instancesUrl, }: { // `external`: off this site (Use with AI, the homepage's AI and MCP doc), so // a plain in the same tab rather than a client navigation. links: { href: string; label: string; external?: boolean }[]; // The Archilyzer home's Official Instances (common/lib/project.ts // INSTANCES_URL); absent on the hub, which lists the instances itself. instancesUrl?: string; }) { const [open, setOpen] = useState(false); return ( Menu {/* Every link closes the sheet on the way out. Header lives in the root layout and never remounts on a client navigation, so without this the sheet would stay open over the page the user just asked for. */} ); }