Cart: use the shared ProductBadge (was missing "Neu")
CartContent.tsx had its own fourth independent discount-badge implementation, never updated for Products.badge — "Neu" showed on the PDP and shop grid but not here. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013Eg6h91yngXmSnM51wxXM8
This commit is contained in:
@@ -15,6 +15,7 @@ import { VersandModal } from "../../components/VersandModal";
|
||||
import { VatBreakdown } from "../../components/VatBreakdown";
|
||||
import { ArrowLeftIcon } from "../../components/ArrowLeftIcon";
|
||||
import { ProductName } from "../../components/ProductName";
|
||||
import { ProductBadge } from "../../components/ProductBadge";
|
||||
import { FreeShippingBanner } from "./FreeShippingBanner";
|
||||
import type { TrustBadge, ShippingSettings } from "../../lib/payload";
|
||||
|
||||
@@ -248,11 +249,9 @@ export function CartContent({
|
||||
className="object-cover"
|
||||
/>
|
||||
)}
|
||||
{discount !== null && (
|
||||
<span className="absolute top-2 left-2 rounded-full bg-brand px-2 py-0.5 text-label font-bold text-text-primary">
|
||||
-{discount}%
|
||||
</span>
|
||||
)}
|
||||
<div className="absolute top-2 left-2">
|
||||
<ProductBadge product={product} />
|
||||
</div>
|
||||
</div>
|
||||
<div className="flex flex-col gap-[0.625rem] items-start flex-1 min-w-0 w-full">
|
||||
{product.href ? (
|
||||
|
||||
Reference in New Issue
Block a user