import Link from 'next/link' import { useRouter } from 'next/router' import { useState } from 'react' export const MenuItemDrop = ({ link }) => { const [show, changeShow] = useState(false) const router = useRouter() if (!link || !link.show) { return null } const hasSubMenu = link?.subMenus?.length > 0 const selected = router.pathname === link.to || router.asPath === link.to return (