diff options
| author | Rafi Zadanly <zadanlyr@gmail.com> | 2023-02-22 23:34:50 +0700 |
|---|---|---|
| committer | Rafi Zadanly <zadanlyr@gmail.com> | 2023-02-22 23:34:50 +0700 |
| commit | 8cfb615556e67408d7afb6d9694b2407447085ff (patch) | |
| tree | 7dd9d93e1b5a27f2efd49083a7b1d4d39a96a738 /src/lib/product/components/ProductCard.jsx | |
| parent | 32f684cc40e66239451fcaa93ae2971b4bd86026 (diff) | |
fix
Diffstat (limited to 'src/lib/product/components/ProductCard.jsx')
| -rw-r--r-- | src/lib/product/components/ProductCard.jsx | 20 |
1 files changed, 14 insertions, 6 deletions
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 ${ |
