mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-05-20 07:26:46 +00:00
fix(修复错误调用React HOOK的问题):
(cherry picked from commit 03408d4d65a52a1388d9fc251c45a624ff056766)
This commit is contained in:
@@ -156,6 +156,7 @@ const LayoutPostList = props => {
|
||||
const LayoutSlug = props => {
|
||||
const { post, lock, validPassword } = props
|
||||
const router = useRouter()
|
||||
const waiting404 = siteConfig('POST_WAITING_TIME_FOR_404') * 1000
|
||||
useEffect(() => {
|
||||
// 404
|
||||
if (!post) {
|
||||
@@ -170,7 +171,7 @@ const LayoutSlug = props => {
|
||||
}
|
||||
}
|
||||
},
|
||||
siteConfig('POST_WAITING_TIME_FOR_404') * 1000
|
||||
waiting404
|
||||
)
|
||||
}
|
||||
}, [post])
|
||||
|
||||
Reference in New Issue
Block a user