mirror of
https://github.com/vercel/commerce.git
synced 2025-06-20 06:01:21 +00:00
feature/cart: display the variant name (cond)
This commit is contained in:
parent
0cf76d9a0c
commit
397ffc1c35
@ -108,10 +108,14 @@ const CartItem = ({
|
|||||||
<div className="flex-1 flex flex-col text-base">
|
<div className="flex-1 flex flex-col text-base">
|
||||||
<Link href={`/product/${item.path}`}>
|
<Link href={`/product/${item.path}`}>
|
||||||
<span
|
<span
|
||||||
className="font-bold text-lg cursor-pointer leading-6"
|
|
||||||
onClick={() => closeSidebarIfPresent()}
|
onClick={() => closeSidebarIfPresent()}
|
||||||
>
|
>
|
||||||
{item.name}
|
<div
|
||||||
|
className="font-bold text-lg cursor-pointer leading-6"
|
||||||
|
>
|
||||||
|
{item.name}
|
||||||
|
</div>
|
||||||
|
{item.variant ? <span> {item.variant.name}</span> : ""}
|
||||||
</span>
|
</span>
|
||||||
</Link>
|
</Link>
|
||||||
{options && options.length > 0 ? (
|
{options && options.length > 0 ? (
|
||||||
|
@ -23,6 +23,7 @@ export const CheckoutDetails = /* GraphQL */ `
|
|||||||
name
|
name
|
||||||
sku
|
sku
|
||||||
product {
|
product {
|
||||||
|
name
|
||||||
slug
|
slug
|
||||||
}
|
}
|
||||||
media {
|
media {
|
||||||
|
@ -113,7 +113,7 @@ function normalizeLineItem({ id, variant, quantity }: CheckoutLine): LineItem {
|
|||||||
id,
|
id,
|
||||||
variantId: String(variant?.id),
|
variantId: String(variant?.id),
|
||||||
productId: String(variant?.id),
|
productId: String(variant?.id),
|
||||||
name: `${variant.name}`,
|
name: `${variant.product.name}`,
|
||||||
quantity,
|
quantity,
|
||||||
variant: {
|
variant: {
|
||||||
id: String(variant?.id),
|
id: String(variant?.id),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user