mirror of
https://github.com/d0zingcat/NotionNext.git
synced 2026-05-14 07:26:52 +00:00
文章空列表跳转处理
This commit is contained in:
@@ -1,12 +1,21 @@
|
||||
import { useRouter } from 'next/router'
|
||||
import { useEffect } from 'react'
|
||||
|
||||
/**
|
||||
* 空白博客 列表
|
||||
* @returns {JSX.Element}
|
||||
* @constructor
|
||||
*/
|
||||
const BlogPostListEmpty = () => {
|
||||
const router = useRouter()
|
||||
useEffect(() => {
|
||||
setTimeout(() => {
|
||||
router.push('/')
|
||||
}, 3000)
|
||||
})
|
||||
return <div className='w-full h-full flex justify-center mx-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>
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user