From 8f9b420e315ae36c6b5aa9df2885e42d9537ea3e Mon Sep 17 00:00:00 2001 From: Kalle <38327916+Sendouc@users.noreply.github.com> Date: Sat, 6 Aug 2022 01:18:03 +0300 Subject: [PATCH] Reset avatar is errored when src changes Closes #844 --- app/components/Avatar.tsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/components/Avatar.tsx b/app/components/Avatar.tsx index 79a4d5e23..bb75b10c8 100644 --- a/app/components/Avatar.tsx +++ b/app/components/Avatar.tsx @@ -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 (