mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-05-14 07:26:52 +00:00
31 lines
864 B
JavaScript
31 lines
864 B
JavaScript
import LayoutBase from './LayoutBase'
|
|
import { ArticleLock } from './components/ArticleLock'
|
|
import NotionPage from '@/components/NotionPage'
|
|
import { ArticleInfo } from './components/ArticleInfo'
|
|
import Comment from '@/components/Comment'
|
|
|
|
export const LayoutSlug = props => {
|
|
const { post, lock, validPassword } = props
|
|
|
|
if (!post) {
|
|
return <LayoutBase {...props} />
|
|
}
|
|
|
|
return (
|
|
<LayoutBase {...props}>
|
|
|
|
{lock && <ArticleLock validPassword={validPassword} />}
|
|
|
|
{!lock && <div id="notion-article" className="px-2 xl:max-w-4xl 2xl:max-w-6xl ">
|
|
|
|
{post && <>
|
|
<ArticleInfo post={post} />
|
|
<NotionPage post={post} />
|
|
<Comment frontMatter={post}/>
|
|
</>}
|
|
</div>}
|
|
|
|
</LayoutBase>
|
|
)
|
|
}
|