feat: change all Link component to SmartLink

Close #3512
This commit is contained in:
anime
2025-07-24 15:06:39 +08:00
parent fc4817e669
commit ba951cd2aa
338 changed files with 1381 additions and 1381 deletions

View File

@@ -1,5 +1,5 @@
import Collapse from '@/components/Collapse'
import Link from 'next/link'
import SmartLink from '@/components/SmartLink'
import { useRouter } from 'next/router'
import { useState } from 'react'
@@ -43,7 +43,7 @@ export const MenuItemCollapse = props => {
}
onClick={toggleShow}>
{!hasSubMenu && (
<Link
<SmartLink
href={url}
target={link?.target}
className='py-2 w-full my-auto items-center justify-between flex '>
@@ -51,7 +51,7 @@ export const MenuItemCollapse = props => {
<div className={`${link.icon} text-center w-4 mr-4`} />
{link.name}
</div>
</Link>
</SmartLink>
)}
{hasSubMenu && (
@@ -84,14 +84,14 @@ export const MenuItemCollapse = props => {
className='
py-2 px-14 cursor-pointer hover:bg-gray-100 dark:text-gray-400 dark:hover:text-white font-bold
dark:bg-black text-left justify-start text-gray-600 bg-gray-50 bg-opacity-20 dark:hover:bg-gray-600 tracking-widest transition-all duration-200'>
<Link href={sUrl} target={'_self'}>
<SmartLink href={sUrl} target={'_self'}>
<div>
<div
className={`${sLink?.icon ? sLink?.icon : 'fas fa-hashtag'} text-center w-3 mr-2 text-xs`}
/>
{sLink.title}
</div>
</Link>
</SmartLink>
</div>
)
})}