Fix type
This commit is contained in:
parent
ec1a5a0e33
commit
fef54f78f4
|
@ -43,11 +43,11 @@ const ProductButton: React.FC< {
|
||||||
}
|
}
|
||||||
|
|
||||||
const showPlaceholder = ! product;
|
const showPlaceholder = ! product;
|
||||||
const showPlacholderImg = showPlaceholder || ! product?.images?.[ 0 ]?.src;
|
const showPlaceholderImg = showPlaceholder || ! product?.images?.[ 0 ]?.src;
|
||||||
const imgSrc = showPlacholderImg
|
const imgSrc = showPlaceholderImg
|
||||||
? `${ WC_BLOCKS_IMAGE_URL }/blocks/product-collection/placeholder.svg`
|
? `${ WC_BLOCKS_IMAGE_URL }/blocks/product-collection/placeholder.svg`
|
||||||
: product.images[ 0 ].src;
|
: product.images[ 0 ].src;
|
||||||
const imgAlt = showPlacholderImg ? '' : product?.name;
|
const imgAlt = showPlaceholderImg ? '' : product?.name;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Button
|
<Button
|
||||||
|
|
Loading…
Reference in New Issue