diff options
| author | Miqdad <ahmadmiqdad27@gmail.com> | 2025-11-01 08:56:14 +0700 |
|---|---|---|
| committer | Miqdad <ahmadmiqdad27@gmail.com> | 2025-11-01 08:56:14 +0700 |
| commit | cc4c840a84039ae9b756b2b2db6622aa4200b757 (patch) | |
| tree | 8b4fb0591fb0f30d07d5c6ff26a4beade51bcd79 /src-migrate/modules | |
| parent | 8942f55ec23c0f663fac797ef4f2c284b3bd98fb (diff) | |
<Miqdad> hide pakai voucher in prod detail when discount = 0
Diffstat (limited to 'src-migrate/modules')
| -rw-r--r-- | src-migrate/modules/product-detail/components/ProductDetail.tsx | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src-migrate/modules/product-detail/components/ProductDetail.tsx b/src-migrate/modules/product-detail/components/ProductDetail.tsx index 51b080ef..c57172dc 100644 --- a/src-migrate/modules/product-detail/components/ProductDetail.tsx +++ b/src-migrate/modules/product-detail/components/ProductDetail.tsx @@ -179,6 +179,7 @@ const ProductDetail = ({ product }: Props) => { useEffect(() => { setDiscount(calcVoucherDiscount()); }, [product?.lowest_price]); + console.log(discount); return ( <> @@ -291,7 +292,7 @@ const ProductDetail = ({ product }: Props) => { {/* ===== Kolom kanan: info ===== */} <div className='md:w-8/12 px-4 md:pl-6'> <div className='h-6 md:h-0' /> - {isMobile && ( + {isMobile && discount > 0 && ( <div className='text text-sm font-medium'> <TicketIcon className='inline text-yellow-300 w-5 h-5' />{' '} Pakai{' '} |
