Fix missing images (#264)

Co-authored-by: B <curciobelen@gmail.com>
This commit is contained in:
cond0r
2021-06-01 05:34:28 +03:00
committed by GitHub
parent 277471cd16
commit 0792eabd4c
2 changed files with 6 additions and 4 deletions

View File

@@ -34,7 +34,7 @@ const ProductCard: FC<Props> = ({
{product?.images && (
<Image
quality="85"
src={product.images[0].url || placeholderImg}
src={product.images[0]?.url || placeholderImg}
alt={product.name || 'Product Image'}
height={320}
width={320}
@@ -70,7 +70,7 @@ const ProductCard: FC<Props> = ({
<Image
alt={product.name || 'Product Image'}
className={s.productImage}
src={product.images[0].url || placeholderImg}
src={product.images[0]?.url || placeholderImg}
height={540}
width={540}
quality="85"