Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(core): hide handling cost if no cost associated #671

Merged
merged 1 commit into from
Mar 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading