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,7 +1,7 @@
import { siteConfig } from '@/lib/config'
import Live2D from '@/components/Live2D'
import { useGlobal } from '@/lib/global'
import Link from 'next/link'
import SmartLink from '@/components/SmartLink'
import dynamic from 'next/dynamic'
const ExampleRecentComments = dynamic(() => import('./ExampleRecentComments'))
@@ -18,13 +18,13 @@ export const SideBar = (props) => {
<ul className="list-reset leading-normal">
{categories?.map(category => {
return (
<Link
<SmartLink
key={category.name}
href={`/category/${category.name}`}
passHref
legacyBehavior>
<li> <a href="#" className="text-gray-darkest text-sm">{category.name}({category.count})</a></li>
</Link>
</SmartLink>
);
})}
</ul>
@@ -39,9 +39,9 @@ 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 href="#" className="text-gray-darkest text-sm">{p.title}</a></li>
</Link>
</SmartLink>
);
})}
</ul>