mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-05-16 23:16:48 +00:00
修复404跳转bug
This commit is contained in:
@@ -26,6 +26,9 @@ const GiscusComponent = dynamic(
|
||||
)
|
||||
|
||||
const Comment = ({ frontMatter }) => {
|
||||
if (!frontMatter) {
|
||||
return <>Loading...</>
|
||||
}
|
||||
const router = useRouter()
|
||||
const { locale, isDarkMode } = useGlobal()
|
||||
return (
|
||||
|
||||
@@ -37,6 +37,10 @@ const Modal = dynamic(
|
||||
}
|
||||
)
|
||||
const NotionPage = ({ post }) => {
|
||||
if (!post || !post.blockMap) {
|
||||
return <>Loading...</>
|
||||
}
|
||||
|
||||
const zoom = typeof window !== 'undefined' && mediumZoom({
|
||||
container: '.notion-viewport',
|
||||
background: 'rgba(0, 0, 0, 0.2)',
|
||||
@@ -57,16 +61,18 @@ const NotionPage = ({ post }) => {
|
||||
}
|
||||
}, [router.events])
|
||||
|
||||
return <NotionRenderer
|
||||
recordMap={post.blockMap}
|
||||
mapPageUrl={mapPageUrl}
|
||||
components={{
|
||||
Code,
|
||||
Collection,
|
||||
Equation,
|
||||
Modal,
|
||||
Pdf
|
||||
}} />
|
||||
return <div id='container'>
|
||||
<NotionRenderer
|
||||
recordMap={post.blockMap}
|
||||
mapPageUrl={mapPageUrl}
|
||||
components={{
|
||||
Code,
|
||||
Collection,
|
||||
Equation,
|
||||
Modal,
|
||||
Pdf
|
||||
}} />
|
||||
</div>
|
||||
}
|
||||
|
||||
const mapPageUrl = id => {
|
||||
|
||||
Reference in New Issue
Block a user