Reset avatar is errored when src changes

Closes #844
This commit is contained in:
Kalle
2022-08-06 01:18:03 +03:00
parent 1157502e0c
commit 8f9b420e31

View File

@@ -22,6 +22,10 @@ export function Avatar({
// TODO: just show text... my profile?
// TODO: also show this if discordAvatar is stale and 404's
React.useEffect(() => {
setIsErrored(false);
}, [discordAvatar]);
return (
<img
className={clsx("avatar", className)}