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


From e2a12aa22089349cb48511d0584991b9db64e0ca Mon Sep 17 00:00:00 2001
From: trisusilo48 <tri.susilo@altama.co.id>
Date: Wed, 20 Nov 2024 11:09:46 +0700
Subject: udpate variants total

---
 src-migrate/modules/product-detail/components/Information.tsx | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

(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 2c23f25e..5e1ea186 100644
--- a/src-migrate/modules/product-detail/components/Information.tsx
+++ b/src-migrate/modules/product-detail/components/Information.tsx
@@ -96,7 +96,7 @@ const Information = ({ product }: Props) => {
         <label className='form-label mb-2 text-lg text-red-600'>
           Pilih Variant * :{' '}
           <span className='text-gray_r-9 text-sm'>
-            {product?.variant_total} Variants
+            {product?.variants?.length} Variants
           </span>{' '}
         </label>
         <AutoComplete
-- 
cgit v1.2.3

