From 7f95711048ec66b3ce832699ee516e55a05b2b05 Mon Sep 17 00:00:00 2001 From: Marco Date: Sun, 2 Aug 2026 08:13:01 +0000 Subject: [PATCH] Link cart line-item titles/images to product detail pages MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cart line items had their own separate markup from ProductCard.tsx and never got the title-link treatment — same product.href check, only rendered as a link when the product actually has a detail page. Co-Authored-By: Claude Sonnet 5 --- app/cart/components/CartContent.tsx | 51 +++++++++++++++++++++-------- 1 file changed, 37 insertions(+), 14 deletions(-) diff --git a/app/cart/components/CartContent.tsx b/app/cart/components/CartContent.tsx index f182d81..d088039 100644 --- a/app/cart/components/CartContent.tsx +++ b/app/cart/components/CartContent.tsx @@ -228,13 +228,25 @@ export function CartContent({ sm: once the row layout kicks in and the image sits beside the text instead. */}
- {product.name} + {product.href ? ( + + {product.name} + + ) : ( + {product.name} + )} {discount !== null && ( -{discount}% @@ -242,13 +254,24 @@ export function CartContent({ )}
-

- {product.name} - {entry.variant ? ` (${entry.variant})` : ""} -

+ {product.href ? ( + + {product.name} + {entry.variant ? ` (${entry.variant})` : ""} + + ) : ( +

+ {product.name} + {entry.variant ? ` (${entry.variant})` : ""} +

+ )} {/* Independent stacked rows, not grid siblings — no equal-height pressure from neighboring lines, so a plain conditional line is enough here. */}