diff options
| author | Rafi Zadanly <zadanlyr@gmail.com> | 2023-02-23 08:20:44 +0700 |
|---|---|---|
| committer | Rafi Zadanly <zadanlyr@gmail.com> | 2023-02-23 08:20:44 +0700 |
| commit | a553af3576985e6d14cf59177a6cca9fa108c0bb (patch) | |
| tree | 763f73dafe6cc69c913eacafdc26e972849092b1 /src/lib/product/components/ProductCard.jsx | |
| parent | e5aea4632cb84c9d5e04024b67d149178f794ba6 (diff) | |
| parent | 404afb8b94b5d8d88f6dfd619cde0b5a122fbc42 (diff) | |
prettier
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 ${ |
