Hide the free-shipping progress banner when the cart has no shippable items

Reuses FreeShippingBanner's existing threshold===null early return —
a "€X bis kostenlosem Versand" nudge makes no sense for a cart that was
never going to be charged shipping.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
Marco
2026-07-29 23:15:32 +00:00
parent c83bbfbc35
commit 1467750db6
+6 -1
View File
@@ -170,7 +170,12 @@ export function CartContent({
) : (
<>
<div className="pt-2 px-[var(--layout-padding-x)] w-full">
<FreeShippingBanner subtotal={subtotal} threshold={freeShippingThreshold} />
{/* threshold forced to null (banner just doesn't render, see its
own early return) whenever nothing in the cart actually
triggers shipping — a "€X bis kostenlosem Versand" nudge
makes no sense for a cart that was never going to be charged
shipping in the first place. */}
<FreeShippingBanner subtotal={subtotal} threshold={cartHasShippableItem(items) ? freeShippingThreshold : null} />
</div>
<div className="flex flex-col lg:flex-row gap-8 lg:gap-10 items-start pb-10 pt-4 px-[var(--layout-padding-x)] w-full">
{/* Cart card — lg:-only split from the sidebar (same "wide content