mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-05-24 15:09:51 +00:00
菜单bug
This commit is contained in:
@@ -4,8 +4,6 @@ import { useRouter } from 'next/router'
|
||||
|
||||
export const MenuItemDrop = ({ link }) => {
|
||||
const [show, changeShow] = useState(false)
|
||||
// const show = true
|
||||
// const changeShow = () => {}
|
||||
const router = useRouter()
|
||||
|
||||
if (!link || !link.show) {
|
||||
@@ -13,7 +11,7 @@ export const MenuItemDrop = ({ link }) => {
|
||||
}
|
||||
const hasSubMenu = link?.subMenus?.length > 0
|
||||
const selected = (router.pathname === link.to) || (router.asPath === link.to)
|
||||
|
||||
console.log('link', link?.to)
|
||||
return <li className='cursor-pointer list-none items-center flex mx-2' onMouseOver={() => changeShow(true)} onMouseOut={() => changeShow(false)} >
|
||||
|
||||
{hasSubMenu &&
|
||||
|
||||
Reference in New Issue
Block a user