From 8a700c32ebfaedc4c653fa8b349a1c495e46b537 Mon Sep 17 00:00:00 2001 From: tangly1024 Date: Wed, 20 Oct 2021 13:47:31 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=87=E7=AB=A0=E7=A9=BA=E5=88=97=E8=A1=A8?= =?UTF-8?q?=E8=B7=B3=E8=BD=AC=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/BlogPostListEmpty.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/components/BlogPostListEmpty.js b/components/BlogPostListEmpty.js index 1dfb71b4..499331c5 100644 --- a/components/BlogPostListEmpty.js +++ b/components/BlogPostListEmpty.js @@ -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
-

No posts found.

+

没有文章了,3秒后返回首页

}