From f86b2adc680a9c6fa0ac92c84bf6d14e2f866d9a Mon Sep 17 00:00:00 2001
From: it-fixcomart <it@fixcomart.co.id>
Date: Fri, 2 Aug 2024 14:48:51 +0700
Subject: <iman> update popup cart

---
 src-migrate/modules/product-promo/components/Section.tsx | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

(limited to 'src-migrate/modules/product-promo/components/Section.tsx')

diff --git a/src-migrate/modules/product-promo/components/Section.tsx b/src-migrate/modules/product-promo/components/Section.tsx
index 4e8a7dd5..2c94c2bb 100644
--- a/src-migrate/modules/product-promo/components/Section.tsx
+++ b/src-migrate/modules/product-promo/components/Section.tsx
@@ -9,12 +9,14 @@ import { IPromotion } from '~/types/promotion'
 import { useModalStore } from "../stores/useModalStore"
 import ProductPromoCard from './Card'
 import ProductPromoModal from "./Modal"
+import { IProductDetail } from '~/types/product';
 
 type Props = {
   productId: number;
+  product: IProductDetail;
 }
 
-const ProductPromoSection = ({ productId }: Props) => {
+const ProductPromoSection = ({ product, productId }: Props) => {
   const promotionsQuery = useQuery({
     queryKey: [`promotions.highlight`, productId],
     queryFn: async () => await fetch(`/api/product-variant/${productId}/promotion/highlight`).then((res) => res.json()) as { data: IPromotion[] }
@@ -30,7 +32,7 @@ const ProductPromoSection = ({ productId }: Props) => {
       height='450px'
       duration='700ms'
     >
-      <ProductPromoModal />
+      <ProductPromoModal product={product}/>
 
       {promotions?.data && promotions?.data.length > 0 && (
         <div className={style.titleWrapper}>
@@ -50,7 +52,7 @@ const ProductPromoSection = ({ productId }: Props) => {
       >
         {promotions?.data.map((promotion) => (
           <div key={promotion.id} className="min-w-[400px] max-w-[400px]">
-            <ProductPromoCard promotion={promotion}  />
+            <ProductPromoCard product={product} promotion={promotion}  />
           </div>
         ))}
       </Skeleton>
-- 
cgit v1.2.3

