import Badge from '@/components/Badge' import NotionIcon from '@/components/NotionIcon' import { siteConfig } from '@/lib/config' import SmartLink from '@/components/SmartLink' import { useRouter } from 'next/router' const BlogPostCard = ({ post, className }) => { const router = useRouter() const currentSelected = decodeURIComponent(router.asPath.split('?')[0]) === post?.href return (
{siteConfig('POST_TITLE_ICON') && ( )}{' '} {post.title}
{/* 最新文章加個紅點 */} {post?.isLatest && siteConfig('GITBOOK_LATEST_POST_RED_BADGE') && ( )}
) } export default BlogPostCard