From 30da2d088793cabfb3c5b21d4560df53187e7047 Mon Sep 17 00:00:00 2001
From: Rafi Zadanly <zadanlyr@gmail.com>
Date: Tue, 20 Feb 2024 16:30:43 +0700
Subject: Fix item url in cart item

---
 src-migrate/modules/cart/components/ItemPromo.tsx | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

(limited to 'src-migrate/modules/cart/components/ItemPromo.tsx')

diff --git a/src-migrate/modules/cart/components/ItemPromo.tsx b/src-migrate/modules/cart/components/ItemPromo.tsx
index d355c82a..878e17ac 100644
--- a/src-migrate/modules/cart/components/ItemPromo.tsx
+++ b/src-migrate/modules/cart/components/ItemPromo.tsx
@@ -13,12 +13,12 @@ type Props = {
 const CartItemPromo = ({ product }: Props) => {
   return (
     <div key={product.id} className={style.wrapper}>
-      <Link href={createSlug('/shop/product/', product.name, product.id.toString())} className={style.imageWrapper}>
+      <Link href={createSlug('/shop/product/', product.parent.name, product.parent.id.toString())} className={style.imageWrapper}>
         {product?.image && <Image src={product.image} alt={product.name} width={128} height={128} className={style.image} />}
       </Link>
 
       <div className={style.details}>
-        <Link href={createSlug('/shop/product/', product.name, product.id.toString())} className={style.name}>
+        <Link href={createSlug('/shop/product/', product.parent.name, product.parent.id.toString())} className={style.name}>
           {product.display_name}
         </Link>
 
-- 
cgit v1.2.3

