mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-05-15 23:16:48 +00:00
22 lines
761 B
JavaScript
22 lines
761 B
JavaScript
import { useGlobal } from '@/lib/global'
|
|
import dynamic from 'next/dynamic'
|
|
|
|
const NotionPage = dynamic(() => import('@/components/NotionPage'))
|
|
|
|
const Announcement = ({ post, className }) => {
|
|
const { locale } = useGlobal()
|
|
if (post?.blockMap) {
|
|
return <div className={className}>
|
|
<section id='announcement-wrapper' className="dark:text-gray-300 border dark:border-black rounded-xl lg:p-6 p-4 bg-white dark:bg-hexo-black-gray">
|
|
<div><i className='mr-2 fas fa-bullhorn' />{locale.COMMON.ANNOUNCEMENT}</div>
|
|
{post && (<div id="announcement-content">
|
|
<NotionPage post={post} className='text-center' />
|
|
</div>)}
|
|
</section>
|
|
</div>
|
|
} else {
|
|
return <></>
|
|
}
|
|
}
|
|
export default Announcement
|