From 6783edec08ac3468eb651e9e3c22cb11fd0c45cb Mon Sep 17 00:00:00 2001 From: tangly1024 Date: Wed, 12 Jan 2022 08:55:41 +0800 Subject: [PATCH 1/2] bugfix: toc --- pages/article/[slug].js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/article/[slug].js b/pages/article/[slug].js index 50fbf3f1..d07466ae 100644 --- a/pages/article/[slug].js +++ b/pages/article/[slug].js @@ -37,7 +37,7 @@ const Slug = ({ const drawerRight = useRef(null) const targetRef = typeof window !== 'undefined' ? document.getElementById('container') : null - const floatSlot = post?.toc.length > 1 ?
{ drawerRight?.current?.handleSwitchVisible() }} />
: null + const floatSlot = post?.toc?.length > 1 ?
{ drawerRight?.current?.handleSwitchVisible() }} />
: null return ( Date: Wed, 12 Jan 2022 09:16:54 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E5=BE=AE=E8=B0=83=EF=BC=9A=20card=E3=80=81?= =?UTF-8?q?menu?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/BlogPostCard.js | 4 ++-- components/MenuButtonGroup.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/components/BlogPostCard.js b/components/BlogPostCard.js index 82a1b5ff..5d4eb7c8 100644 --- a/components/BlogPostCard.js +++ b/components/BlogPostCard.js @@ -39,7 +39,7 @@ const BlogPostCard = ({ post, showSummary }) => { - {(!showPreview || showSummary) &&

+ {(!showPreview || showSummary) &&

{post.summary}

} @@ -57,7 +57,7 @@ const BlogPostCard = ({ post, showSummary }) => { /> } -
+
{locale.COMMON.ARTICLE_DETAIL} diff --git a/components/MenuButtonGroup.js b/components/MenuButtonGroup.js index 2ef9b09a..50d4d817 100644 --- a/components/MenuButtonGroup.js +++ b/components/MenuButtonGroup.js @@ -25,7 +25,7 @@ const MenuButtonGroup = ({ allowCollapse = false, postCount }) => { return -
+
{link.name}