From 9d280577bee70f37e47d0d4fe5e2b1966691a49a Mon Sep 17 00:00:00 2001 From: schroda <50052685+schroda@users.noreply.github.com> Date: Thu, 11 Apr 2024 02:02:31 +0200 Subject: [PATCH] Remove add/remove library button in migration mode from manga cards (#730) --- src/components/MangaCard.tsx | 1 + src/components/manga/MangaBadges.tsx | 5 ++++- src/components/manga/MangaCard.types.tsx | 2 +- src/components/manga/MangaGridCard.tsx | 3 ++- src/components/manga/MangaListCard.tsx | 3 ++- 5 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/components/MangaCard.tsx b/src/components/MangaCard.tsx index e09ffb36..36c753fc 100644 --- a/src/components/MangaCard.tsx +++ b/src/components/MangaCard.tsx @@ -120,6 +120,7 @@ export const MangaCard = (props: MangaCardProps) => { unread={unreadCount} downloadCount={downloadCount} updateLibraryState={updateLibraryState} + mode={mode} /> ), [inLibraryIndicator, isInLibrary, unreadCount, downloadCount, updateLibraryState], diff --git a/src/components/manga/MangaBadges.tsx b/src/components/manga/MangaBadges.tsx index 42f937ff..3d3a12d7 100644 --- a/src/components/manga/MangaBadges.tsx +++ b/src/components/manga/MangaBadges.tsx @@ -11,6 +11,7 @@ import { useTranslation } from 'react-i18next'; import Button from '@mui/material/Button/Button'; import Typography from '@mui/material/Typography/Typography'; import { useLibraryOptionsContext } from '@/components/context/LibraryOptionsContext.tsx'; +import { MangaCardMode } from '@/components/manga/MangaCard.types.tsx'; const BadgeContainer = styled('div')({ display: 'flex', @@ -31,12 +32,14 @@ export const MangaBadges = ({ isInLibrary, unread, downloadCount, + mode, }: { inLibraryIndicator?: boolean; updateLibraryState: () => void; isInLibrary: boolean; unread?: number; downloadCount?: number; + mode: MangaCardMode; }) => { const { t } = useTranslation(); @@ -46,7 +49,7 @@ export const MangaBadges = ({ return ( - {inLibraryIndicator && ( + {inLibraryIndicator && mode === 'source' && (