"use client"; import { type ReactNode, useRef } from "react"; import Image from "next/image"; import Link from "next/link"; interface MobileNavProps { children: ReactNode; menuLabel?: string; closeLabel?: string; brandLabel?: string; } export function MobileNav({ children, menuLabel = "Open menu", closeLabel = "Close menu", brandLabel = "Atom", }: MobileNavProps) { const detailsRef = useRef(null); const handleClick = (e: React.MouseEvent) => { if ((e.target as HTMLElement).closest("a") && detailsRef.current) { detailsRef.current.open = false; } }; return (
{brandLabel} {closeLabel}
{children}
); }