Skip to content

Commit

Permalink
perf: Use labelFreeOver when the amount is equal to zero
Browse files Browse the repository at this point in the history
  • Loading branch information
acasazza committed May 3, 2022
1 parent 60e9b46 commit e514cfa
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/components/ShippingMethodPrice.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,8 @@ const ShippingMethodPrice: FunctionComponent<ShippingMethodPriceProps> = (
{order?.total_amount_cents &&
isNumber(freeOverAmountCents) &&
freeOverAmountCents < order.total_amount_cents
? labelFreeOver
: order?.total_amount_cents === 0
? labelFreeOver
: price}
</span>
Expand Down

0 comments on commit e514cfa

Please sign in to comment.