Skip to content

Commit

Permalink
refactor: Abstract result into a variable
Browse files Browse the repository at this point in the history
  • Loading branch information
sashko9807 committed Dec 11, 2024
1 parent d758faf commit fe21f3a
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ export const TaxesCheckbox = () => {
const { t } = useTranslation('donation-flow')
const [amountWithFees] = useField('finalAmount')
const [amountWithoutFees] = useField<number>('amountWithoutFees')
const showCalculatedFees = Boolean(amountWithFees.value)
return (
<>
<Grid2 container>
Expand Down Expand Up @@ -50,7 +51,7 @@ export const TaxesCheckbox = () => {
/>
</Grid2>
</Grid2>
{!!amountWithFees.value && (
{showCalculatedFees && (
<Trans
t={t}
i18nKey="step.payment-method.alert.calculated-fees"
Expand Down

0 comments on commit fe21f3a

Please sign in to comment.