From 71924deefd8a0639583bccf713a026b9ffcade9b Mon Sep 17 00:00:00 2001 From: tangly1024 Date: Tue, 14 Dec 2021 19:32:06 +0800 Subject: [PATCH] =?UTF-8?q?feature:=20=E4=BF=AE=E5=A4=8D=E7=BC=96=E8=AF=91?= =?UTF-8?q?=E5=BC=82=E5=B8=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/BlogPostListEmpty.js | 2 -- components/Pagination.js | 17 ++++------------- components/ShareBar.js | 2 +- layouts/BaseLayout.js | 2 +- lib/notion/getMetadata.js | 2 +- lib/notion/getPageTableOfContents.js | 5 ++--- pages/_document.js | 1 + 7 files changed, 10 insertions(+), 21 deletions(-) diff --git a/components/BlogPostListEmpty.js b/components/BlogPostListEmpty.js index 37982cd9..79f88837 100644 --- a/components/BlogPostListEmpty.js +++ b/components/BlogPostListEmpty.js @@ -1,5 +1,3 @@ -import { useRouter } from 'next/router' -import { useEffect } from 'react' /** * 空白博客 列表 diff --git a/components/Pagination.js b/components/Pagination.js index 8bc06c1c..6753987e 100644 --- a/components/Pagination.js +++ b/components/Pagination.js @@ -17,13 +17,9 @@ const Pagination = ({ page, showNext }) => { return (
+ href={ { + pathname: (currentPage - 1 === 1 ? `${BLOG.path || '/'}` : `/page/${currentPage - 1}`), query: router.query.s ? { s: router.query.s } : {} + } } passHref > - +