From 192fc72f69725ffe57cbf2e65e421b71122bf4ea Mon Sep 17 00:00:00 2001 From: tangly1024 Date: Wed, 1 Dec 2021 13:33:47 +0800 Subject: [PATCH] =?UTF-8?q?bugfix:=20=E5=88=86=E7=B1=BB=E3=80=81=E6=A0=87?= =?UTF-8?q?=E7=AD=BE=E9=A1=B5=E9=9D=A2=E7=9A=84=E6=9C=80=E6=96=B0=E6=96=87?= =?UTF-8?q?=E7=AB=A0=E5=88=97=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/category/[category].js | 9 +++++---- pages/tag/[tag].js | 9 +++++---- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/pages/category/[category].js b/pages/category/[category].js index eec3196a..ab07f1f5 100644 --- a/pages/category/[category].js +++ b/pages/category/[category].js @@ -7,18 +7,18 @@ import React from 'react' import CategoryList from '@/components/CategoryList' import { getNotionPageData } from '@/lib/notion/getNotionData' -export default function Category ({ tags, posts, category, categories }) { +export default function Category ({ tags, allPosts, filteredPosts, category, categories }) { const meta = { title: `${BLOG.title} | ${category}`, description: BLOG.description, type: 'website' } - return + return
- +
} @@ -37,7 +37,8 @@ export async function getStaticProps ({ params }) { return { props: { tags, - posts: filteredPosts, + allPosts, + filteredPosts, category, categories }, diff --git a/pages/tag/[tag].js b/pages/tag/[tag].js index 603891a6..0d7048da 100644 --- a/pages/tag/[tag].js +++ b/pages/tag/[tag].js @@ -6,18 +6,18 @@ import BlogPostListScroll from '@/components/BlogPostListScroll' import TagList from '@/components/TagList' import { getNotionPageData } from '@/lib/notion/getNotionData' -export default function Tag ({ tags, posts, currentTag, categories }) { +export default function Tag ({ tags, allPosts, filteredPosts, currentTag, categories }) { const meta = { title: `${BLOG.title} | #${currentTag}`, description: BLOG.description, type: 'website' } - return + return
- +
} @@ -36,7 +36,8 @@ export async function getStaticProps ({ params }) { return { props: { tags, - posts: filteredPosts, + allPosts, + filteredPosts, currentTag, categories },