diff options
| author | IT Fixcomart <it@fixcomart.co.id> | 2022-10-31 17:21:10 +0700 |
|---|---|---|
| committer | IT Fixcomart <it@fixcomart.co.id> | 2022-10-31 17:21:10 +0700 |
| commit | 83354e3e9af77447a399b1f47fa22c7fccbbbe72 (patch) | |
| tree | 0415100b5d0b31a4ac9bd1f5c47a361d6b7c731b /src/components | |
| parent | d6d2d9ceef2e95b604ac4ebdc054cad44a8440b1 (diff) | |
Create noimage
Diffstat (limited to 'src/components')
| -rw-r--r-- | src/components/productCard.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/components/productCard.js b/src/components/productCard.js index dc292316..6e703670 100644 --- a/src/components/productCard.js +++ b/src/components/productCard.js @@ -7,7 +7,7 @@ export default function productCard({ data }) { return ( <div className="product-card"> <Link href={'/shop/product/' + createSlug(product.name, product.id)} className="block"> - <img src={product.image} alt={product.name} className="product-card__image" loading="lazy" /> + <img src={product.image ? product.image : '/images/noimage.jpeg'} alt={product.name} className="product-card__image" loading="lazy" /> </Link> <div className="product-card__description"> <div> @@ -16,9 +16,9 @@ export default function productCard({ data }) { ) : ( <span className="product-card__brand">-</span> )} - <a href={'/shop/product/' + createSlug(product.name, product.id)} className="product-card__title wrap-line-ellipsis-3"> + <Link href={'/shop/product/' + createSlug(product.name, product.id)} className="product-card__title wrap-line-ellipsis-3"> {product.name} - </a> + </Link> </div> <div> {product.lowest_price.discount_percentage > 0 ? ( |
