import TagItemMini from './TagItemMini' import Comment from '@/components/Comment' import NotionPage from '@/components/NotionPage' 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 */} {post.title}
)}
{/* 文章Title */}
{post.title}
{post?.category && (<> {post.category} | )} {post?.type !== 'Page' && (<> {date} | {locale.COMMON.LAST_EDITED_TIME}: {post.lastEditedTime} )}
{post.tagItems && (
{post.tagItems.map(tag => ( ))}
)}
{/* Notion文章主体 */}
{post && }
{/* 文章内嵌广告 */}
{post.type === 'Post' && } {/* 评论互动 */}
) }