summaryrefslogtreecommitdiff
path: root/src-migrate/modules/product-promo/components/Card.tsx
diff options
context:
space:
mode:
authorIT Fixcomart <it@fixcomart.co.id>2024-09-04 03:00:30 +0000
committertrisusilo <tri.susilo@altama.co.id>2024-09-04 03:00:30 +0000
commit69c9ecc99c487c16129f5dcb66c4775453589220 (patch)
tree7aead541e26b5166ae3d2049fc732c7030e4e9c6 /src-migrate/modules/product-promo/components/Card.tsx
parent985f29aa1d9b8cbea49d25c30099f88c86bdc13f (diff)
parentf6a398c036d2ab833ecb798fa88e641e2f801bb0 (diff)
Merged in backup-release (pull request #289)
Backup release Approved-by: trisusilo
Diffstat (limited to 'src-migrate/modules/product-promo/components/Card.tsx')
-rw-r--r--src-migrate/modules/product-promo/components/Card.tsx10
1 files changed, 5 insertions, 5 deletions
diff --git a/src-migrate/modules/product-promo/components/Card.tsx b/src-migrate/modules/product-promo/components/Card.tsx
index 728d23ca..b8abe5ec 100644
--- a/src-migrate/modules/product-promo/components/Card.tsx
+++ b/src-migrate/modules/product-promo/components/Card.tsx
@@ -15,16 +15,16 @@ import clsxm from '~/libs/clsxm'
import ProductPromoItem from './Item'
import ProductPromoAddToCart from "./AddToCart"
import ProductPromoCardCountdown from "./CardCountdown"
-
+import { IProductDetail } from '~/types/product';
import MobileView from '../../../../src/core/components/views/MobileView';
import DesktopView from '../../../../src/core/components/views/DesktopView';
type Props = {
promotion: IPromotion
-
+ product: IProductDetail
}
-const ProductPromoCard = ({ promotion}: Props) => {
+const ProductPromoCard = ({product, promotion}: Props) => {
const [products, setProducts] = useState<IProductVariantPromo[]>([])
const [freeProducts, setFreeProducts] = useState<IProductVariantPromo[]>([])
const [error, setError] = useState<string | null>(null)
@@ -132,7 +132,7 @@ const ProductPromoCard = ({ promotion}: Props) => {
</div>
<div>
- <ProductPromoAddToCart promotion={promotion} />
+ <ProductPromoAddToCart product={product} promotion={promotion} variant={products[0]} />
</div>
</div>
@@ -189,7 +189,7 @@ const ProductPromoCard = ({ promotion}: Props) => {
</div>
</div>
<div>
- <ProductPromoAddToCart promotion={promotion} />
+ <ProductPromoAddToCart product={product} promotion={promotion} variant={products[0]}/>
</div>
</div>