Reset img error state when paging stories
This commit is contained in:
parent
896b36c301
commit
97454b6bac
1 changed files with 4 additions and 0 deletions
|
@ -76,6 +76,10 @@ export function StoryImage({
|
||||||
}
|
}
|
||||||
}, [isPaused]);
|
}, [isPaused]);
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
setHasImgError(false);
|
||||||
|
}, [attachment?.url, attachment?.thumbnail?.url]);
|
||||||
|
|
||||||
if (!attachment) {
|
if (!attachment) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue