From c4ad41b0b6d5cd44644db2df5a4f1d8df9e12b2e Mon Sep 17 00:00:00 2001 From: tangly1024 Date: Sat, 24 Jun 2023 12:12:11 +0800 Subject: [PATCH] fix map key --- themes/gitbook/components/BlogPostListScroll.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/themes/gitbook/components/BlogPostListScroll.js b/themes/gitbook/components/BlogPostListScroll.js index b8269a4d..038b7a1d 100644 --- a/themes/gitbook/components/BlogPostListScroll.js +++ b/themes/gitbook/components/BlogPostListScroll.js @@ -18,14 +18,14 @@ const BlogPostListScroll = ({ posts = [], currentSearch }) => { } else { return
{/* 文章列表 */} - {filteredPosts?.map(group => { + {filteredPosts?.map((group, index) => { if (group.category) { - return <> + return
{group.category}
{group.items?.map(post => (
))} - +
} else { - return <> {group.items?.map(post => ())} + return
{group.items?.map(post => ())}
} })}