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

@@ -2,7 +2,7 @@ import Live2D from '@/components/Live2D'
import { siteConfig } from '@/lib/config'
import { useGlobal } from '@/lib/global'
import dynamic from 'next/dynamic'
import Link from 'next/link'
import SmartLink from '@/components/SmartLink'
import CONFIG from '../config'
import Announcement from './Announcement'
import Catalog from './Catalog'
@@ -53,7 +53,7 @@ export const SideBar = props => {
<ul className='list-reset leading-normal'>
{categoryOptions?.map(category => {
return (
<Link
<SmartLink
key={category.name}
href={`/category/${category.name}`}
passHref
@@ -66,7 +66,7 @@ export const SideBar = props => {
{category.name}({category.count})
</a>
</li>
</Link>
</SmartLink>
)
})}
</ul>
@@ -83,7 +83,7 @@ export const SideBar = props => {
<ul className='list-reset leading-normal'>
{latestPosts?.map(p => {
return (
<Link key={p.id} href={`/${p.slug}`} passHref legacyBehavior>
<SmartLink key={p.id} href={`/${p.slug}`} passHref legacyBehavior>
<li>
{' '}
<a
@@ -92,7 +92,7 @@ export const SideBar = props => {
{p.title}
</a>
</li>
</Link>
</SmartLink>
)
})}
</ul>