import Comment from '@/components/Comment'
import NotionPage from '@/components/NotionPage'
import ShareBar from '@/components/ShareBar'
import formatDate from '@/lib/formatDate'
import { useGlobal } from '@/lib/global'
import Link from 'next/link'
import ArticleAround from './ArticleAround'
/**
*
* @param {*} param0
* @returns
*/
export default function ArticleDetail(props) {
const { post, prev, next } = props
const { locale } = useGlobal()
if (!post) {
return <>>
}
const date = formatDate(post?.date?.start_date || post?.createdTime, locale.LOCALE)
return (
{post?.type && !post?.type !== 'Page' && post?.page_cover && (
{/* eslint-disable-next-line @next/next/no-img-element */}
)}
{/* 文章Title */}
{post.title}
{post?.category && (<>
{post.category}
|
>)}
{post?.type !== 'Page' && (<>
{date}
|
{locale.COMMON.LAST_EDITED_TIME}: {post.lastEditedTime}
>)}
{/* Notion文章主体 */}
{post.type === 'Post' &&
}
{/* 评论互动 */}
)
}