mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-06-01 15:10:14 +00:00
@@ -1,4 +1,4 @@
|
||||
import Link from 'next/link'
|
||||
import SmartLink from '@/components/SmartLink'
|
||||
import { useRouter } from 'next/router'
|
||||
import { useState } from 'react'
|
||||
|
||||
@@ -23,7 +23,7 @@ export const MenuItem = ({ link }) => {
|
||||
{/* 普通 MenuItem */}
|
||||
{!hasSubMenu && (
|
||||
<li className='group relative whitespace-nowrap'>
|
||||
<Link
|
||||
<SmartLink
|
||||
href={link?.href}
|
||||
target={link?.target}
|
||||
className={`ud-menu-scroll mx-8 flex py-2 text-base font-medium text-dark group-hover:text-primary dark:text-white lg:mr-0 lg:inline-flex lg:px-0 lg:py-6 ${
|
||||
@@ -33,7 +33,7 @@ export const MenuItem = ({ link }) => {
|
||||
} lg:group-hover:opacity-70`}>
|
||||
{link?.icon && <i className={link.icon + ' mr-2 my-auto'} />}
|
||||
{link?.name}
|
||||
</Link>
|
||||
</SmartLink>
|
||||
</li>
|
||||
)}
|
||||
|
||||
@@ -71,7 +71,7 @@ export const MenuItem = ({ link }) => {
|
||||
: 'hidden opacity-0 invisible'
|
||||
}`}>
|
||||
{link.subMenus.map((sLink, index) => (
|
||||
<Link
|
||||
<SmartLink
|
||||
key={index}
|
||||
href={sLink.href}
|
||||
target={link?.target}
|
||||
@@ -81,7 +81,7 @@ export const MenuItem = ({ link }) => {
|
||||
{link?.icon && <i className={sLink.icon + ' mr-2 my-auto'} />}{' '}
|
||||
{sLink.title}
|
||||
</span>
|
||||
</Link>
|
||||
</SmartLink>
|
||||
))}
|
||||
</div>
|
||||
</li>
|
||||
|
||||
Reference in New Issue
Block a user