Skip to content

Commit

Permalink
[fix][sale widget] cm-658 hide more options divider if no fiat paymen…
Browse files Browse the repository at this point in the history
…t options are available (#1795)
  • Loading branch information
mimi-imtbl authored May 20, 2024
1 parent 4f4996d commit 48c40ea
Showing 1 changed file with 14 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -112,18 +112,22 @@ export function CoinsDrawer({
/>
)}
>
<Divider
size="small"
rc={<Caption />}
sx={{ my: 'base.spacing.x4' }}
>
{t('views.ORDER_SUMMARY.coinsDrawer.divider')}
</Divider>
{(disabledPaymentTypes?.includes(SalePaymentTypes.CREDIT)
&& disabledPaymentTypes?.includes(SalePaymentTypes.DEBIT)) ?? (
<Divider
size="small"
rc={<Caption />}
sx={{ my: 'base.spacing.x4' }}
>
{t('views.ORDER_SUMMARY.coinsDrawer.divider')}
</Divider>
)}
<PaymentOptions
onClick={onPayWithCard}
paymentOptions={[SalePaymentTypes.DEBIT, SalePaymentTypes.CREDIT].filter(
(type) => !disabledPaymentTypes?.includes(type),
)}
paymentOptions={[
SalePaymentTypes.DEBIT,
SalePaymentTypes.CREDIT,
].filter((type) => !disabledPaymentTypes?.includes(type))}
captions={{
[SalePaymentTypes.DEBIT]: t(
'views.ORDER_SUMMARY.coinsDrawer.payWithCard.caption',
Expand Down

0 comments on commit 48c40ea

Please sign in to comment.