little adjust

This commit is contained in:
tangly1024
2023-11-03 23:24:53 +08:00
parent 537282e693
commit 4cd32a8f03
2 changed files with 16 additions and 15 deletions

View File

@@ -5,7 +5,7 @@ import { useState } from 'react'
export const MenuItemDrop = ({ link }) => {
const [show, changeShow] = useState(false)
const hasSubMenu = link?.subMenus?.length > 0
const selected = useRouter().asPath === link.to
const selected = useRouter().asPath === link?.to
if (!link || !link.show) {
return null