summaryrefslogtreecommitdiff
path: root/src-migrate
diff options
context:
space:
mode:
authorit-fixcomart <it@fixcomart.co.id>2024-11-20 09:07:01 +0700
committerit-fixcomart <it@fixcomart.co.id>2024-11-20 09:07:01 +0700
commit4ad0a71a100f4a5f7893b778705c4a67ba29ceeb (patch)
tree71316870ee70b48ec102cb8d50a4d0aaaaff453d /src-migrate
parent867bbe11bf98297177d999fa4a8c69054d2ec72d (diff)
<iman> handle no image brand
Diffstat (limited to 'src-migrate')
-rw-r--r--src-migrate/modules/product-detail/components/Information.tsx20
1 files changed, 13 insertions, 7 deletions
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>
) : (
'-'