import Link from 'next/link' import TagItemMini from './TagItemMini' import { useGlobal } from '@/lib/global' import BLOG from '@/blog.config' import NotionIcon from '@/components/NotionIcon' import WavesArea from './WavesArea' export default function PostHeader({ post, siteInfo }) { const { locale } = useGlobal() if (!post) { return <> } // 文章头图 const headerImage = post?.pageCover ? post.pageCover : siteInfo?.pageCover return (
{/* eslint-disable-next-line @next/next/no-img-element */}
{post.category && <>
{post.category}
}
{/* 文章Title */}
{post.title}
{post?.type !== 'Page' && ( <> {locale.COMMON.POST_TIME}:{post?.publishTime} )}
{locale.COMMON.LAST_EDITED_TIME}: {post.lastEditedTime}
{BLOG.ANALYTICS_BUSUANZI_ENABLE &&
{locale.COMMON.VIEWS}
}
{post.tagItems && (
{post.tagItems.map(tag => ( ))}
)}
) }