From 3fa96dfb8d824f0afa01f47538a8d6c7800645d9 Mon Sep 17 00:00:00 2001 From: schroda <50052685+schroda@users.noreply.github.com> Date: Fri, 26 Jul 2024 13:39:43 +0200 Subject: [PATCH] Show continue read button only when chapters are available Manga can be added to the library while they have not been initialized yet. Thus, for these cases, the reader is broken in case it gets opened. To prevent this, the continue read button should not be shown in the library --- src/components/MangaCard.tsx | 4 +++- src/components/manga/MangaCard.types.tsx | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/components/MangaCard.tsx b/src/components/MangaCard.tsx index a161e56c..1366729a 100644 --- a/src/components/MangaCard.tsx +++ b/src/components/MangaCard.tsx @@ -107,7 +107,9 @@ export const MangaCard = (props: MangaCardProps) => { const continueReadingButton = useMemo( () => ( & - SingleModeProps['manga'] & + Omit & Partial> & - MangaChapterCountInfo & { + Partial & { latestReadChapter?: Pick | null; firstUnreadChapter?: Pick | null; };