This commit is contained in:
Manish Menaria 2024-09-18 21:13:04 +05:30
parent ec1a5a0e33
commit fef54f78f4
1 changed files with 3 additions and 3 deletions

View File

@ -43,11 +43,11 @@ const ProductButton: React.FC< {
}
const showPlaceholder = ! product;
const showPlacholderImg = showPlaceholder || ! product?.images?.[ 0 ]?.src;
const imgSrc = showPlacholderImg
const showPlaceholderImg = showPlaceholder || ! product?.images?.[ 0 ]?.src;
const imgSrc = showPlaceholderImg
? `${ WC_BLOCKS_IMAGE_URL }/blocks/product-collection/placeholder.svg`
: product.images[ 0 ].src;
const imgAlt = showPlacholderImg ? '' : product?.name;
const imgAlt = showPlaceholderImg ? '' : product?.name;
return (
<Button