Skip to content

Commit

Permalink
feat(core): hide handling cost if no cost associated
Browse files Browse the repository at this point in the history
  • Loading branch information
jorgemoya committed Mar 18, 2024
1 parent efd6387 commit 9bd8ea9
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
5 changes: 5 additions & 0 deletions .changeset/wet-students-fry.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@bigcommerce/catalyst-core": minor
---

Hide handling cost in shipping estimate if there is no cost associated.
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,14 @@ export const ShippingEstimator = ({
key={shippingCosts.selectedShippingOption}
/>
</div>
<div className="inline-flex justify-between border-t border-t-gray-200 pt-4">
<span className="text-base font-semibold">{t('handlingCost')}</span>
<span className="text-base">
{currencyFormatter.format(shippingCosts.handlingCostTotal)}
</span>
</div>
{Boolean(shippingCosts.handlingCostTotal) && (
<div className="inline-flex justify-between border-t border-t-gray-200 pt-4">
<span className="text-base font-semibold">{t('handlingCost')}</span>
<span className="text-base">
{currencyFormatter.format(shippingCosts.handlingCostTotal)}
</span>
</div>
)}
</div>
) : (
<div className="flex flex-col justify-between gap-4 border-t border-t-gray-200 py-4">
Expand Down

0 comments on commit 9bd8ea9

Please sign in to comment.