mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-06-01 15:10:14 +00:00
feature:
404页面检测文章加载; Page类型排版微调
This commit is contained in:
@@ -11,8 +11,14 @@ import { useRouter } from 'next/router'
|
||||
export default function Custom404 () {
|
||||
const router = useRouter()
|
||||
useEffect(() => {
|
||||
// 延时3秒如果加载失败就返回首页
|
||||
setTimeout(() => {
|
||||
router.push('/')
|
||||
if (window) {
|
||||
const article = document.getElementById('article-wrapper')
|
||||
if (!article) {
|
||||
router.push('/')
|
||||
}
|
||||
}
|
||||
}, 3000)
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user