From 8cfb615556e67408d7afb6d9694b2407447085ff Mon Sep 17 00:00:00 2001
From: Rafi Zadanly <zadanlyr@gmail.com>
Date: Wed, 22 Feb 2023 23:34:50 +0700
Subject: fix

---
 src/lib/product/components/ProductCard.jsx | 20 ++++++++++++++------
 1 file changed, 14 insertions(+), 6 deletions(-)

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

diff --git a/src/lib/product/components/ProductCard.jsx b/src/lib/product/components/ProductCard.jsx
index dd221e4f..6b88a3bd 100644
--- a/src/lib/product/components/ProductCard.jsx
+++ b/src/lib/product/components/ProductCard.jsx
@@ -23,12 +23,20 @@ const ProductCard = ({ product, simpleTitle }) => {
           )}
         </Link>
         <div className='p-2 pb-3 text-caption-2 leading-5'>
-          <Link
-            href={createSlug('/shop/brands/', product?.manufacture?.name, product?.manufacture.id)}
-            className='mb-1'
-          >
-            {product?.manufacture?.name}
-          </Link>
+          {product?.manufacture?.name ? (
+            <Link
+              href={createSlug(
+                '/shop/brands/',
+                product?.manufacture?.name,
+                product?.manufacture.id
+              )}
+              className='mb-1'
+            >
+              {product.manufacture.name}
+            </Link>
+          ) : (
+            <div>-</div>
+          )}
           <Link
             href={createSlug('/shop/product/', product?.name, product?.id)}
             className={`font-medium mb-2 !text-gray_r-12 ${
-- 
cgit v1.2.3

