import BLOG from '@/blog.config' import { useGlobal } from '@/lib/global' import Link from 'next/link' import React from 'react' import { Code, Collection, Equation, NotionRenderer } from 'react-notion-x' import CONFIG_MEDIUM from '../config_medium' import CategoryItem from './CategoryItem' import TagItemMini from './TagItemMini' const BlogPostCard = ({ post, showSummary }) => { const showPreview = CONFIG_MEDIUM.POST_LIST_PREVIEW && post.blockMap const { locale } = useGlobal() return (
{post.title}
{post.date.start_date}
{ CONFIG_MEDIUM.POST_LIST_CATEGORY && } { CONFIG_MEDIUM.POST_LIST_TAG && post?.tagItems?.map(tag => )}
{(!showPreview || showSummary) &&

{post.summary}

} {showPreview &&
}
) } const mapPageUrl = id => { return 'https://www.notion.so/' + id.replace(/-/g, '') } export default BlogPostCard