import LazyImage from '@/components/LazyImage' import NotionIcon from '@/components/NotionIcon' import NotionPage from '@/components/NotionPage' import TwikooCommentCount from '@/components/TwikooCommentCount' import { siteConfig } from '@/lib/config' import { useGlobal } from '@/lib/global' import SmartLink from '@/components/SmartLink' import CONFIG from '../config' import CategoryItem from './CategoryItem' import TagItemMini from './TagItemMini' const BlogPostCard = ({ post, showSummary }) => { const showPreview = siteConfig('MEDIUM_POST_LIST_PREVIEW', null, CONFIG) && post.blockMap const { locale } = useGlobal() return (

{siteConfig('MEDIUM_POST_LIST_COVER', null, CONFIG) && (
)} {siteConfig('POST_TITLE_ICON') && ( )} {post.title}

{post.date?.start_date}
{siteConfig('MEDIUM_POST_LIST_CATEGORY', null, CONFIG) && ( )} {siteConfig('MEDIUM_POST_LIST_TAG', null, CONFIG) && post?.tagItems?.map(tag => ( ))}
{(!showPreview || showSummary) && (
{post.summary}
)} {showPreview && (
{locale.COMMON.ARTICLE_DETAIL}
)}
) } export default BlogPostCard