@@ -30,8 +30,9 @@ export default function Cart({ loaderData }: Route.ComponentProps) {
3030 Carrito de compras
3131 </ h1 >
3232 < div className = "border-solid border rounded-xl flex flex-col" >
33- { cart ?. items ?. map ( ( { product, quantity, id, attributeValueId } ) => (
34- < div key = { product . id } className = "flex gap-7 p-6 border-b" >
33+ { cart ?. items ?. map ( ( { product, quantity, id, variantAttributeValue
34+ } ) => (
35+ < div key = { variantAttributeValue ?. id } className = "flex gap-7 p-6 border-b" >
3536 < div className = "w-20 rounded-xl bg-muted" >
3637 < img
3738 src = { product . imgSrc }
@@ -41,7 +42,7 @@ export default function Cart({ loaderData }: Route.ComponentProps) {
4142 </ div >
4243 < div className = "flex grow flex-col justify-between" >
4344 < div className = "flex gap-4 justify-between items-center" >
44- < h2 className = "text-sm" > { product . title } </ h2 >
45+ < h2 className = "text-sm" > { product . title } ( { variantAttributeValue ?. value } ) </ h2 >
4546 < Form method = "post" action = "/cart/remove-item" >
4647 < Button
4748 size = "sm-icon"
@@ -62,7 +63,7 @@ export default function Cart({ loaderData }: Route.ComponentProps) {
6263 < input type = "hidden" name = "quantity" value = "-1" />
6364 < Button
6465 name = "attributeValueId"
65- value = { attributeValueId }
66+ value = { variantAttributeValue ?. id }
6667 variant = "outline"
6768 size = "sm-icon"
6869 disabled = { quantity === 1 }
@@ -78,7 +79,7 @@ export default function Cart({ loaderData }: Route.ComponentProps) {
7879 variant = "outline"
7980 size = "sm-icon"
8081 name = "attributeValueId"
81- value = { attributeValueId }
82+ value = { variantAttributeValue ?. id }
8283 >
8384 < Plus />
8485 </ Button >
0 commit comments