From 49f2e6a5612d000c3a740513c1a54b73bb656d77 Mon Sep 17 00:00:00 2001
From: it-fixcomart <it@fixcomart.co.id>
Date: Fri, 15 Nov 2024 09:52:30 +0700
Subject: <iman> if has image brand then show brand image else brand name

---
 .../product/components/Product/ProductDesktopVariant.jsx | 16 +++++++++++-----
 1 file changed, 11 insertions(+), 5 deletions(-)

(limited to 'src/lib/product/components/Product/ProductDesktopVariant.jsx')

diff --git a/src/lib/product/components/Product/ProductDesktopVariant.jsx b/src/lib/product/components/Product/ProductDesktopVariant.jsx
index 6fe75fff..5dfd452b 100644
--- a/src/lib/product/components/Product/ProductDesktopVariant.jsx
+++ b/src/lib/product/components/Product/ProductDesktopVariant.jsx
@@ -264,11 +264,17 @@ const ProductDesktopVariant = ({
                         product.manufacture.id.toString()
                       )}
                     >
-                      <Image
-                        width={100}
-                        src={product.manufacture.logo}
-                        alt={product.manufacture.name}
-                      />
+                      {product?.manufacture.logo ? (
+                        <Image
+                          width={100}
+                          src={product.manufacture.logo}
+                          alt={product.manufacture.name}
+                        />
+                      ) : (
+                        <p className='font-bold text-red-500'>
+                          {product.manufacture.name}
+                        </p>
+                      )}
                     </Link>
                   </div>
                 </div>
-- 
cgit v1.2.3

