import BLOG from '@/blog.config' import { useGlobal } from '@/lib/global' import { faAngleRight, faFolder } from '@fortawesome/free-solid-svg-icons' import { FontAwesomeIcon } from '@fortawesome/react-fontawesome' 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 TagItemMini from './TagItemMini' const BlogPostCard = ({ post, showSummary }) => { const { locale } = useGlobal() const showPreview = BLOG.home?.showPreview && post.blockMap return (
{post.title}
{post.category} | {post.date.start_date}
{post.tagItems.map(tag => ())}
{(!showPreview || showSummary) &&

{post.summary}

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