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 NotionIcon from '@/components/NotionIcon'
import NotionPage from '@/components/NotionPage'
import { siteConfig } from '@/lib/config'
import { useGlobal } from '@/lib/global'
import Link from 'next/link'
import SmartLink from '@/components/SmartLink'
const BlogPost = ({ post }) => {
const { NOTION_CONFIG } = useGlobal()
@@ -10,7 +10,7 @@ const BlogPost = ({ post }) => {
siteConfig('POST_LIST_PREVIEW', false, NOTION_CONFIG) && post?.blockMap
return (
<Link href={post?.href}>
<SmartLink href={post?.href}>
<article key={post.id} className='mb-6 md:mb-8'>
<header className='flex flex-col justify-between md:flex-row md:items-baseline'>
<h2 className='text-lg md:text-xl font-medium mb-2 cursor-pointer text-black dark:text-gray-100'>
@@ -37,7 +37,7 @@ const BlogPost = ({ post }) => {
)}
</main>
</article>
</Link>
</SmartLink>
)
}