import { useState, useEffect } from 'react' import { Button } from '@/components/ui/button' import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger, } from '@/components/ui/dropdown-menu' import { NAV_LINKS } from '@/consts' import { Menu } from 'lucide-react' const MobileMenu = () => { const [isOpen, setIsOpen] = useState(false) useEffect(() => { const handleViewTransitionStart = () => { setIsOpen(false) } document.addEventListener('astro:before-swap', handleViewTransitionStart) return () => { document.removeEventListener( 'astro:before-swap', handleViewTransitionStart, ) } }, []) return ( {NAV_LINKS.map((item) => ( setIsOpen(false)} > {item.label} ))} ) } export default MobileMenu