diff --git a/src/lib/components/image/index.tsx b/src/lib/components/image/index.tsx index d125aa8..ca4acb4 100644 --- a/src/lib/components/image/index.tsx +++ b/src/lib/components/image/index.tsx @@ -35,8 +35,8 @@ export const ImageIPFS = ({ setImgSrc(imgSrcCleaned) }, [hash, gateway]) - const handleOnError = (e: SyntheticEvent): void => { - if (e.type === 'error') { + const handleOnError = (event: SyntheticEvent): void => { + if (event.type === 'error') { setImgSrc(fallbackImage) } } @@ -50,8 +50,8 @@ export const ImageIPFS = ({ style={style} className={className} loading={imgLoading} - onError={(e) => { - handleOnError(e) + onError={(event) => { + handleOnError(event) }} {...props} />