This commit is contained in:
tangly1024.com
2023-11-06 16:28:01 +08:00
parent ecf7825dad
commit a0b481eaca
137 changed files with 326 additions and 383 deletions

View File

@@ -1,4 +1,4 @@
import BLOG from '@/blog.config'
import { siteConfig } from '@/lib/config'
import Link from 'next/link'
import { useRouter } from 'next/router'
@@ -8,7 +8,7 @@ const BlogPostCard = ({ post, className }) => {
return (
<div key={post.id} className={`${className} py-1 cursor-pointer px-2 hover:bg-gray-50 rounded-md dark:hover:bg-gray-600 ${currentSelected ? 'bg-green-50 text-green-500' : ''}`}>
<div className="flex flex-col w-full select-none">
<Link href={`${BLOG.SUB_PATH}/${post.slug}`} passHref>
<Link href={`${siteConfig('SUB_PATH')}/${post.slug}`} passHref>
{post.title}
</Link>
</div>