From fe21f3aaf2342b0a3e6e93ecb9f9bcf8c8ff267e Mon Sep 17 00:00:00 2001 From: Aleksandar Petkov Date: Wed, 11 Dec 2024 18:22:28 +0200 Subject: [PATCH] refactor: Abstract result into a variable --- .../donation-flow/steps/payment-method/TaxesCheckbox.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/client/donation-flow/steps/payment-method/TaxesCheckbox.tsx b/src/components/client/donation-flow/steps/payment-method/TaxesCheckbox.tsx index 8bd7479bd..26f7964bd 100644 --- a/src/components/client/donation-flow/steps/payment-method/TaxesCheckbox.tsx +++ b/src/components/client/donation-flow/steps/payment-method/TaxesCheckbox.tsx @@ -12,6 +12,7 @@ export const TaxesCheckbox = () => { const { t } = useTranslation('donation-flow') const [amountWithFees] = useField('finalAmount') const [amountWithoutFees] = useField('amountWithoutFees') + const showCalculatedFees = Boolean(amountWithFees.value) return ( <> @@ -50,7 +51,7 @@ export const TaxesCheckbox = () => { /> - {!!amountWithFees.value && ( + {showCalculatedFees && (