diff options
Diffstat (limited to 'src/lib/product/components/Product/ProductMobile.jsx')
| -rw-r--r-- | src/lib/product/components/Product/ProductMobile.jsx | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/src/lib/product/components/Product/ProductMobile.jsx b/src/lib/product/components/Product/ProductMobile.jsx index 2090d324..f3afa938 100644 --- a/src/lib/product/components/Product/ProductMobile.jsx +++ b/src/lib/product/components/Product/ProductMobile.jsx @@ -41,7 +41,8 @@ const ProductMobile = ({ product, wishlist, toggleWishlist }) => { name: product.name, price: getLowestPrice(), stock: product.stockTotal, - weight: product.weight + weight: product.weight, + hasProgram: false }) const variantOptions = product.variants?.map((variant) => ({ @@ -69,7 +70,8 @@ const ProductMobile = ({ product, wishlist, toggleWishlist }) => { name: variant.parent.name + variantAttributes, price: variant.price, stock: variant.stock, - weight: variant.weight + weight: variant.weight, + hasProgram: variant.hasProgram }) } }, [selectedVariant, product]) @@ -190,14 +192,16 @@ const ProductMobile = ({ product, wishlist, toggleWishlist }) => { isSearchable={product.variantTotal > 10} /> </div> - <div className='mt-5'> - <PromotionType - variantId={product.variants[0].id} - setPromotionActiveId={setPromotionActiveId} - promotionActiveId={promotionActiveId} - quantity={quantity} - ></PromotionType> - </div> + {activeVariant.hasProgram && ( + <div className='mt-5'> + <PromotionType + variantId={product.variants[0].id} + setPromotionActiveId={setPromotionActiveId} + promotionActiveId={promotionActiveId} + quantity={quantity} + ></PromotionType> + </div> + )} <div className='mt-4 mb-2'>Jumlah</div> <div className='flex gap-x-3'> |
