summaryrefslogtreecommitdiff
path: root/src-migrate/modules/product-card/components
diff options
context:
space:
mode:
authorRafi Zadanly <zadanlyr@gmail.com>2024-01-18 12:08:37 +0700
committerRafi Zadanly <zadanlyr@gmail.com>2024-01-18 12:08:37 +0700
commitf02511b103acce8d3fa4bc174a43be15c4cca052 (patch)
tree08b01776038a9c44f0e21b85c3f776b22c342081 /src-migrate/modules/product-card/components
parentf7a0be1407da7edab60f6cb2ca3f1ef97acf811a (diff)
Update add to wishlist in product detail
Diffstat (limited to 'src-migrate/modules/product-card/components')
-rw-r--r--src-migrate/modules/product-card/components/ProductCard.tsx5
1 files changed, 4 insertions, 1 deletions
diff --git a/src-migrate/modules/product-card/components/ProductCard.tsx b/src-migrate/modules/product-card/components/ProductCard.tsx
index c8a0b701..0a97b344 100644
--- a/src-migrate/modules/product-card/components/ProductCard.tsx
+++ b/src-migrate/modules/product-card/components/ProductCard.tsx
@@ -26,7 +26,7 @@ const ProductCard = ({ product, layout = 'vertical' }: Props) => {
[style['wrapper-h']]: layout === 'horizontal',
})}
>
- <div className={clsxm({
+ <div className={clsxm('relative', {
[style['image-v']]: layout === 'vertical',
[style['image-h']]: layout === 'horizontal',
})}>
@@ -38,6 +38,9 @@ const ProductCard = ({ product, layout = 'vertical' }: Props) => {
height={128}
className='object-contain object-center h-full w-full'
/>
+ {product.variant_total > 1 && (
+ <div className={style['variant-badge']}>{product.variant_total} Varian</div>
+ )}
</Link>
</div>