summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorit-fixcomart <it@fixcomart.co.id>2024-11-15 09:52:30 +0700
committerit-fixcomart <it@fixcomart.co.id>2024-11-15 09:52:30 +0700
commit49f2e6a5612d000c3a740513c1a54b73bb656d77 (patch)
treea0ee711bace657f4fa79b436fc87b0298e7dd0bb
parent31fca1b5d023abb96aad53ac2e26b77ce16e51e1 (diff)
<iman> if has image brand then show brand image else brand name
-rw-r--r--src/lib/product/components/Product/ProductDesktopVariant.jsx16
1 files changed, 11 insertions, 5 deletions
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>