import { useRef } from 'react'; import PropTypes from 'prop-types'; import { getPrimaryBgColorClass, shouldForceWhiteTextLightDark, shouldForceWhiteTextLightMode } from '../ProductTheme'; import { clsm } from '../../../../../utils'; const ProductCardImage = ({ imageUrl, title, price, color, customClasses }) => { const imgRef = useRef(); const onErrorHandler = () => { imgRef.current.style.display = 'none'; }; return (