mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-05-22 15:09:43 +00:00
修复404跳转bug
This commit is contained in:
@@ -24,19 +24,18 @@ const Slug = props => {
|
||||
const article = document.getElementById('container')
|
||||
if (!article) {
|
||||
router.push('/404').then(() => {
|
||||
console.log('找不到页面', router.asPath)
|
||||
console.warn('找不到页面', router.asPath)
|
||||
})
|
||||
}
|
||||
}
|
||||
}, 3000)
|
||||
})
|
||||
|
||||
return <p>Redirecting...</p>
|
||||
const meta = { title: `${props?.siteInfo?.title} | loading` }
|
||||
return <ThemeComponents.LayoutSlug {...props} showArticleInfo={true} meta={meta} />
|
||||
}
|
||||
|
||||
// 文章锁🔐
|
||||
const [lock, setLock] = useState(post.password && post.password !== '')
|
||||
console.log('lock 默认值', lock)
|
||||
useEffect(() => {
|
||||
if (post.password && post.password !== '') {
|
||||
setLock(true)
|
||||
|
||||
Reference in New Issue
Block a user