Failed image fallback React
Unanswered
Champagne D’Argent posted this in #help-forum
Champagne D’ArgentOP
<img
style={{width:'14px', height:'14px'}}
src={`https://raw.githubusercontent.com/spectrum-finance/token-logos/master/logos/ergo/${token.tokenId}`}
alt="Not Found"
onError={(e) => {
e.currentTarget.onerror = null; // prevents looping
e.currentTarget.src='https://github.com/spectrum-finance/token-logos/blob/master/logos/empty.svg';
}}/> This is very glitchty. I tyhought I would have to memoize the url. However, I am not sure