Skip to content

Commit

Permalink
fix: hide terms based upon prop (#408)
Browse files Browse the repository at this point in the history
  • Loading branch information
PritishBudhiraja authored May 30, 2024
1 parent 2e3552c commit 8a5d554
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/Components/SavedMethods.res
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,9 @@ let make = (
<SaveDetailsCheckbox isChecked=isSaveCardsChecked setIsChecked=setIsSaveCardsChecked />
</div>
</RenderIf>
<RenderIf condition={paymentMethodListValue.payment_type === SETUP_MANDATE}>
<RenderIf
condition={displaySavedPaymentMethodsCheckbox &&
paymentMethodListValue.payment_type === SETUP_MANDATE}>
<div
className="opacity-50 text-xs mb-2 text-left"
style={
Expand Down
2 changes: 1 addition & 1 deletion src/Payments/CardPayment.res
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ let make = (
<RenderIf condition={showFields || isBancontact}>
<Surcharge paymentMethod paymentMethodType cardBrand={cardBrand->CardUtils.getCardType} />
</RenderIf>
<RenderIf condition={!isBancontact}>
<RenderIf condition={displaySavedPaymentMethodsCheckbox && !isBancontact}>
{switch (
paymentMethodListValue.mandate_payment,
options.terms.card,
Expand Down

0 comments on commit 8a5d554

Please sign in to comment.