mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-06-03 07:26:45 +00:00
文章空列表跳转处理
This commit is contained in:
@@ -1,12 +1,21 @@
|
|||||||
|
import { useRouter } from 'next/router'
|
||||||
|
import { useEffect } from 'react'
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 空白博客 列表
|
* 空白博客 列表
|
||||||
* @returns {JSX.Element}
|
* @returns {JSX.Element}
|
||||||
* @constructor
|
* @constructor
|
||||||
*/
|
*/
|
||||||
const BlogPostListEmpty = () => {
|
const BlogPostListEmpty = () => {
|
||||||
|
const router = useRouter()
|
||||||
|
useEffect(() => {
|
||||||
|
setTimeout(() => {
|
||||||
|
router.push('/')
|
||||||
|
}, 3000)
|
||||||
|
})
|
||||||
return <div className='w-full h-full flex justify-center mx-auto'>
|
return <div className='w-full h-full flex justify-center mx-auto'>
|
||||||
<div className='align-middle text-center my-auto'>
|
<div className='align-middle text-center my-auto'>
|
||||||
<p className='text-gray-500 dark:text-gray-300'>No posts found.</p>
|
<p className='text-gray-500 dark:text-gray-300'>没有文章了,3秒后返回首页</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user