import BLOG from '@/blog.config' import { useGlobal } from '@/lib/global' import Image from 'next/image' import Link from 'next/link' import React from 'react' import { Code, Collection, CollectionRow, Equation, NotionRenderer } from 'react-notion-x' import Card from './Card' import TagItemMini from './TagItemMini' import CONFIG_NEXT from '../config_next' const BlogPostCard = ({ post, showSummary }) => { const { locale } = useGlobal() const showPreview = CONFIG_NEXT.POST_LIST_PREVIEW && post.blockMap return (
{post.title}
{ post.category && (<> {post.category} | ) } {post.date.start_date}
{post.tagItems.map(tag => ())}
{(!showPreview || showSummary) &&

{post.summary}

} {showPreview && post?.blockMap &&
}
{locale.COMMON.ARTICLE_DETAIL}
{CONFIG_NEXT.POST_LIST_COVER && post?.page_cover && (
{post.title}
)}
) } const mapPageUrl = id => { return 'https://www.notion.so/' + id.replace(/-/g, '') } export default BlogPostCard