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 { ArrowPath, ChevronLeft, ChevronRight } from '@/components/HeroIcons'
import LazyImage from '@/components/LazyImage'
import { compressImage } from '@/lib/notion/mapImage'
import { Dialog, Transition } from '@headlessui/react'
import Link from 'next/link'
import SmartLink from '@/components/SmartLink'
import { Fragment, useRef, useState } from 'react'
import { usePlogGlobal } from '..'
@@ -105,7 +105,7 @@ export default function Modal(props) {
{/* </div> */}
<Link href={modalContent?.href}>
<SmartLink href={modalContent?.href}>
<LazyImage
onLoad={handleImageLoad}
placeholderSrc={thumbnail}
@@ -113,7 +113,7 @@ export default function Modal(props) {
ref={imgRef}
className={`w-full select-none max-w-7xl max-h-[90vh] shadow-xl animate__animated animate__fadeIn'`}
/>
</Link>
</SmartLink>
<>
<div className='absolute bottom-0 left-0 m-4 z-20'>
@@ -134,11 +134,11 @@ export default function Modal(props) {
{modalContent?.category && (
<div className='flex'>
<Link
<SmartLink
href={`/category/${modalContent?.category}`}
className='text-xs rounded-lg mt-3 px-2 py-1 bg-black bg-opacity-20 text-white hover:bg-blue-700 hover:text-white duration-200'>
{modalContent?.category}
</Link>
</SmartLink>
</div>
)}
</div>