Reset img error state when paging stories

This commit is contained in:
Josh Perez 2022-11-23 02:29:01 -05:00 committed by GitHub
parent 896b36c301
commit 97454b6bac
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -76,6 +76,10 @@ export function StoryImage({
}
}, [isPaused]);
useEffect(() => {
setHasImgError(false);
}, [attachment?.url, attachment?.thumbnail?.url]);
if (!attachment) {
return null;
}