From 16df3517419f04c946b280dd5e4794db9e892009 Mon Sep 17 00:00:00 2001 From: DrMint Date: Sun, 15 May 2022 01:27:17 +0200 Subject: [PATCH] Fixed visual bug + grouping bug --- src/components/PreviewCard.tsx | 4 ++-- src/pages/contents/index.tsx | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/components/PreviewCard.tsx b/src/components/PreviewCard.tsx index e38d291..30cf338 100644 --- a/src/components/PreviewCard.tsx +++ b/src/components/PreviewCard.tsx @@ -120,7 +120,7 @@ export function PreviewCard(props: Immutable): JSX.Element { {thumbnail && stackNumber > 0 && ( <> ): JSX.Element { />
diff --git a/src/pages/contents/index.tsx b/src/pages/contents/index.tsx index 0591088..daaf74c 100644 --- a/src/pages/contents/index.tsx +++ b/src/pages/contents/index.tsx @@ -242,11 +242,12 @@ function getGroups( items.map((item) => { const type = item.attributes?.type?.data?.attributes?.titles?.[0]?.title ?? - prettySlug(item.attributes?.type?.data?.attributes?.slug); + item.attributes?.type?.data?.attributes?.slug + ? prettySlug(item.attributes.type.data.attributes.slug) + : langui.no_type; if (!group.has(type)) group.set(type, []); group.get(type)?.push(item); }); - return group; }