Update image when src url changes

When e.g. switching between 2 different manga pages, the thumbnail did not update because the img fetch was not triggered in case the src url changed
This commit is contained in:
schroda
2024-04-21 00:04:00 +02:00
parent 2066851793
commit 18365a26c1

View File

@@ -99,7 +99,7 @@ export const SpinnerImage = forwardRef((props: IProps, imgRef: ForwardedRef<HTML
clearTimeout(cacheTimeout); clearTimeout(cacheTimeout);
imageRequest.abortRequest(new Error('Component was unmounted')); imageRequest.abortRequest(new Error('Component was unmounted'));
}; };
}, [imgLoadRetryKey]); }, [src, imgLoadRetryKey]);
return ( return (
<> <>