From 4ad0a71a100f4a5f7893b778705c4a67ba29ceeb Mon Sep 17 00:00:00 2001
From: it-fixcomart <it@fixcomart.co.id>
Date: Wed, 20 Nov 2024 09:07:01 +0700
Subject: <iman> handle no image brand

---
 .../product-detail/components/Information.tsx        | 20 +++++++++++++-------
 1 file changed, 13 insertions(+), 7 deletions(-)

(limited to 'src-migrate/modules/product-detail/components/Information.tsx')

diff --git a/src-migrate/modules/product-detail/components/Information.tsx b/src-migrate/modules/product-detail/components/Information.tsx
index b9f4be91..2c23f25e 100644
--- a/src-migrate/modules/product-detail/components/Information.tsx
+++ b/src-migrate/modules/product-detail/components/Information.tsx
@@ -190,13 +190,19 @@ const Information = ({ product }: Props) => {
                 product.manufacture.id.toString()
               )}
             >
-              <Image
-                height={50}
-                width={100}
-                src={product.manufacture.logo}
-                alt={product.manufacture.name}
-                className='h-8 object-fit'
-              />
+              {product?.manufacture.logo ? (
+                <Image
+                  height={50}
+                  width={100}
+                  src={product.manufacture.logo}
+                  alt={product.manufacture.name}
+                  className='h-8 object-fit'
+                />
+              ) : (
+                <p className='font-bold text-red-500'>
+                  {product.manufacture.name}
+                </p>
+              )}
             </Link>
           ) : (
             '-'
-- 
cgit v1.2.3

