summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMiqdad <ahmadmiqdad27@gmail.com>2025-10-27 09:22:59 +0700
committerMiqdad <ahmadmiqdad27@gmail.com>2025-10-27 09:22:59 +0700
commitea8ebd3ee364cdf0ef09b410f85fed69c6d57534 (patch)
treeb3d2550edb6e9be3f7b802405e040f893a7b26bc /src
parentb8ece41f83e2099e454c886feb8280bf3a9b75d2 (diff)
<MIqdad> pickup now fix
Diffstat (limited to 'src')
-rw-r--r--src/lib/product/components/ProductCard.jsx27
1 files changed, 8 insertions, 19 deletions
diff --git a/src/lib/product/components/ProductCard.jsx b/src/lib/product/components/ProductCard.jsx
index 801ca8f9..fbd5021f 100644
--- a/src/lib/product/components/ProductCard.jsx
+++ b/src/lib/product/components/ProductCard.jsx
@@ -116,7 +116,6 @@ const ProductCard = ({ product, simpleTitle, variant = 'vertical' }) => {
</div>
</div>
- {/* BADGE DISKON Kanan-ATAS */}
{(product?.lowestPrice?.discountPercentage ?? 0) > 0 && (
<div className='absolute right-0 top-1.5 '>
<div className='bg-red-600 text-white px-2 py-1 rounded-l-lg shadow-sm text-xs font-bold leading-none'>
@@ -125,37 +124,27 @@ const ProductCard = ({ product, simpleTitle, variant = 'vertical' }) => {
</div>
)}
- {/* BOTTOM-LEFT: Varian + PICK UP NOW */}
{(product?.variantTotal > 1 || product?.isInBu) && (
- <div
- className='
- absolute bottom-1.5 left-1.5 z-30
- flex items-center gap-2 flex-nowrap
- max-w-[calc(100%-12px)] overflow-hidden
- '
- >
+ <div className='absolute bottom-1.5 left-1.5 z-30 flex items-center gap-2'>
+ {' '}
{product?.variantTotal > 1 && (
- <div className='badge-gray shrink-0'>
- {product.variantTotal} Varian
+ <div className='badge-gray'>
+ {' '}
+ {product.variantTotal} Varian{' '}
</div>
- )}
-
+ )}{' '}
{product?.isInBu && (
<Image
src='/images/PICKUP-NOW.png'
alt='Pick Up Now'
width={83}
height={24}
- // biar ikut mengecil & gak keluar div:
- className='drop-shadow-sm h-5 w-auto sm:h-6 md:h-6 max-w-[70%] shrink'
- sizes='(max-width: 640px) 120px, (max-width: 1024px) 140px, 160px'
- style={{ height: '1.25rem', width: 'auto' }} // override ukuran intrinsic
+ className='drop-shadow-sm'
loading='eager'
/>
- )}
+ )}{' '}
</div>
)}
-
{router.pathname != '/' && product?.flashSale?.id > 0 && (
<div className='absolute bottom-0 w-full grid'>
<div className='absolute bottom-0 w-full h-full'>