From 68a9164bf739f1ea118b49b0341053dc9ca1ac01 Mon Sep 17 00:00:00 2001 From: spaenleh Date: Fri, 16 Feb 2024 07:33:26 +0100 Subject: [PATCH] fix: remove unused files --- src/components/common/CardIcon.tsx | 28 ------------------ src/components/common/CardList.tsx | 46 ------------------------------ 2 files changed, 74 deletions(-) delete mode 100644 src/components/common/CardIcon.tsx delete mode 100644 src/components/common/CardList.tsx diff --git a/src/components/common/CardIcon.tsx b/src/components/common/CardIcon.tsx deleted file mode 100644 index ff601b91e..000000000 --- a/src/components/common/CardIcon.tsx +++ /dev/null @@ -1,28 +0,0 @@ -// eslint-disable-next-line @typescript-eslint/ban-ts-comment -// @ts-ignore -import { ReactComponent as DefaultCardIcon } from 'payment-icons/min/flat/default.svg'; -// eslint-disable-next-line @typescript-eslint/ban-ts-comment -// @ts-ignore -import { ReactComponent as MasterCardIcon } from 'payment-icons/min/flat/mastercard.svg'; -// eslint-disable-next-line @typescript-eslint/ban-ts-comment -// @ts-ignore -import { ReactComponent as VisaIcon } from 'payment-icons/min/flat/visa.svg'; - -const styles = { - height: 35, - width: 'auto', - marginRight: 10, -}; - -const CardIcon = ({ brand }: { brand?: string }): JSX.Element => { - switch (brand) { - case 'visa': - return ; - case 'mastercard': - return ; - default: - return ; - } -}; - -export default CardIcon; diff --git a/src/components/common/CardList.tsx b/src/components/common/CardList.tsx deleted file mode 100644 index 5869a7ba4..000000000 --- a/src/components/common/CardList.tsx +++ /dev/null @@ -1,46 +0,0 @@ -import React, { MouseEventHandler } from 'react'; - -import { - List, - ListItemButton, - ListItemIcon, - ListItemText, -} from '@mui/material'; - -import { hooks } from '../../config/queryClient'; -import AddCardModal from './AddCardModal'; -import CardIcon from './CardIcon'; - -const { useCards } = hooks; - -type Props = { - handleCardSelection: (card: any) => MouseEventHandler; - selected: string; -}; - -const CardList = ({ handleCardSelection, selected }: Props): JSX.Element => { - const { data: cards = [] } = useCards(); - - return ( - - {cards.map((card: any) => ( - - - - - - {card?.brand?.toUpperCase()}
- •••• •••• •••• {card?.lastFourDigits} -
-
- ))} - -
- ); -}; - -export default CardList;