From 7dbca25dede6cf213831f45321f5c7a28b4a6122 Mon Sep 17 00:00:00 2001
From: it-fixcomart <it@fixcomart.co.id>
Date: Thu, 1 Aug 2024 09:07:41 +0700
Subject: <iman> add parameter product

---
 src-migrate/modules/product-promo/components/ModalContent.tsx | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

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

diff --git a/src-migrate/modules/product-promo/components/ModalContent.tsx b/src-migrate/modules/product-promo/components/ModalContent.tsx
index ab5129f8..44ad52d6 100644
--- a/src-migrate/modules/product-promo/components/ModalContent.tsx
+++ b/src-migrate/modules/product-promo/components/ModalContent.tsx
@@ -5,8 +5,11 @@ import { getVariantPromoByCategory } from "~/services/productVariant"
 
 import { useModalStore } from "../stores/useModalStore"
 import ProductPromoCard from "./Card"
-
-const ProductPromoModalContent = () => {
+import { IProductDetail } from '~/types/product';
+type Props = {
+  product: IProductDetail
+}
+const ProductPromoModalContent = ({product}:Props) => {
   const { activeTab, variantId } = useModalStore()
 
   const promotionsQuery = useQuery(
@@ -24,7 +27,7 @@ const ProductPromoModalContent = () => {
     <Skeleton isLoaded={!promotionsQuery.isLoading} className='min-h-[70vh] max-h-[70vh]'>
       <div className="grid grid-cols-1 gap-y-6 pb-6">
         {promotions?.data.map((promo) => (
-          <ProductPromoCard key={promo.id} promotion={promo} />
+          <ProductPromoCard key={promo.id} promotion={promo} product={product} />
         ))}
         {promotions?.data.length === 0 && (
           <div className="py-10 rounded-lg h-fit text-center text-body-1 font-semibold text-gray-800 bg-gray-200">Belum ada promo pada kategori ini</div>
-- 
cgit v1.2.3

