From f02511b103acce8d3fa4bc174a43be15c4cca052 Mon Sep 17 00:00:00 2001
From: Rafi Zadanly <zadanlyr@gmail.com>
Date: Thu, 18 Jan 2024 12:08:37 +0700
Subject: Update add to wishlist in product detail

---
 src-migrate/modules/product-card/components/ProductCard.tsx | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

(limited to 'src-migrate/modules/product-card/components/ProductCard.tsx')

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>
 
-- 
cgit v1.2.3

