From 30a105968502a68e3f4824a47a3c077e567e368a Mon Sep 17 00:00:00 2001 From: Aizad Ridzo <103104395+aizad-deriv@users.noreply.github.com> Date: Wed, 20 Mar 2024 14:54:20 +0800 Subject: [PATCH] chore: Remove landing company shortcode logo on Carousel Cards (#14244) --- .../WalletsAddMoreCard/WalletsAddMoreCard.tsx | 18 +++--------------- .../WalletsAddMoreCardBanner.scss | 3 +-- .../WalletsAddMoreCardBanner.tsx | 11 +++-------- .../WalletsAddMoreCarousel.tsx | 1 - packages/wallets/src/types.ts | 2 ++ 5 files changed, 9 insertions(+), 26 deletions(-) diff --git a/packages/wallets/src/components/WalletsAddMoreCard/WalletsAddMoreCard.tsx b/packages/wallets/src/components/WalletsAddMoreCard/WalletsAddMoreCard.tsx index 55b897c827c9..31c76ff0afdd 100644 --- a/packages/wallets/src/components/WalletsAddMoreCard/WalletsAddMoreCard.tsx +++ b/packages/wallets/src/components/WalletsAddMoreCard/WalletsAddMoreCard.tsx @@ -1,26 +1,14 @@ import React from 'react'; -import { THooks } from '../../types'; +import { TWalletCarouselItem } from '../../types'; import { WalletGradientBackground } from '../WalletGradientBackground'; import WalletsAddMoreCardBanner from '../WalletsAddMoreCardBanner'; import WalletsAddMoreCardContent from '../WalletsAddMoreCardContent'; -type TProps = THooks.AllWalletAccounts; - -const WalletsAddMoreCard: React.FC = ({ - currency, - is_added: isAdded, - is_crypto: isCrypto, - landing_company_name: landingCompanyName, -}) => { +const WalletsAddMoreCard: React.FC = ({ currency, is_added: isAdded, is_crypto: isCrypto }) => { return (
- +
diff --git a/packages/wallets/src/components/WalletsAddMoreCardBanner/WalletsAddMoreCardBanner.scss b/packages/wallets/src/components/WalletsAddMoreCardBanner/WalletsAddMoreCardBanner.scss index 730d71371438..e5047dc57890 100644 --- a/packages/wallets/src/components/WalletsAddMoreCardBanner/WalletsAddMoreCardBanner.scss +++ b/packages/wallets/src/components/WalletsAddMoreCardBanner/WalletsAddMoreCardBanner.scss @@ -16,8 +16,7 @@ flex-shrink: 0; } &-header { - display: flex; - justify-content: space-between; + margin-right: auto; } &-button { background-color: #ffffff; diff --git a/packages/wallets/src/components/WalletsAddMoreCardBanner/WalletsAddMoreCardBanner.tsx b/packages/wallets/src/components/WalletsAddMoreCardBanner/WalletsAddMoreCardBanner.tsx index 62b3ea20f1cb..52f351dd6482 100644 --- a/packages/wallets/src/components/WalletsAddMoreCardBanner/WalletsAddMoreCardBanner.tsx +++ b/packages/wallets/src/components/WalletsAddMoreCardBanner/WalletsAddMoreCardBanner.tsx @@ -6,22 +6,18 @@ import useSyncLocalStorageClientAccounts from '../../hooks/useSyncLocalStorageCl import useWalletAccountSwitcher from '../../hooks/useWalletAccountSwitcher'; import CheckIcon from '../../public/images/check.svg'; import PlusIcon from '../../public/images/plus.svg'; -import { THooks } from '../../types'; +import { TWalletCarouselItem } from '../../types'; import { WalletButton } from '../Base'; import { useModal } from '../ModalProvider'; import { WalletAddedSuccess } from '../WalletAddedSuccess'; import WalletAddMoreCurrencyIcon from '../WalletAddMoreCurrencyIcon'; import { WalletError } from '../WalletError'; -import WalletListCardBadge from '../WalletListCardBadge/WalletListCardBadge'; -type TProps = THooks.AllWalletAccounts; - -const WalletsAddMoreCardBanner: React.FC = ({ +const WalletsAddMoreCardBanner: React.FC = ({ currency, is_added: isAdded, is_crypto: isCrypto, - landing_company_name: landingCompanyName, -}: TProps) => { +}) => { const switchWalletAccount = useWalletAccountSwitcher(); const { data, error, isSuccess: isMutateSuccess, mutate, status } = useCreateWallet(); @@ -88,7 +84,6 @@ const WalletsAddMoreCardBanner: React.FC = ({ - { is_added={wallet.is_added} is_crypto={wallet.is_crypto} key={`wallets_add_more_${wallet.currency}-${wallet.landing_company_name}-${wallet.is_added}`} - landing_company_name={wallet.landing_company_name} /> ))} diff --git a/packages/wallets/src/types.ts b/packages/wallets/src/types.ts index 7f3af2b12729..cb5ddbbf4dcf 100644 --- a/packages/wallets/src/types.ts +++ b/packages/wallets/src/types.ts @@ -98,3 +98,5 @@ export type TWalletLandingCompanyName = | Extract | 'virtual'; export type TMT5LandingCompanyName = THooks.MT5AccountsList['landing_company_short']; + +export type TWalletCarouselItem = Omit;