import BLOG from '@/blog.config' import NotionPage from '@/components/NotionPage' import { useGlobal } from '@/lib/global' import Link from 'next/link' import CONFIG from '../config' import CategoryItem from './CategoryItem' import TagItemMini from './TagItemMini' import TwikooCommentCount from '@/components/TwikooCommentCount' import LazyImage from '@/components/LazyImage' const BlogPostCard = ({ post, showSummary }) => { const showPreview = CONFIG.POST_LIST_PREVIEW && post.blockMap const { locale } = useGlobal() return (
{CONFIG.POST_LIST_COVER &&
} {post.title}
{post.date?.start_date}
{CONFIG.POST_LIST_CATEGORY && } {CONFIG.POST_LIST_TAG && post?.tagItems?.map(tag => )}
{(!showPreview || showSummary) && (

{post.summary}

)} {showPreview && (
{locale.COMMON.ARTICLE_DETAIL}
)}
) } export default BlogPostCard