From 41a1c686dc324bfb468100e0e7e33866c731800d Mon Sep 17 00:00:00 2001 From: ekzyis <27162016+ekzyis@users.noreply.github.com> Date: Thu, 9 Nov 2023 01:17:51 +0100 Subject: [PATCH] Fix stale images (#618) Co-authored-by: ekzyis --- components/user-header.js | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/components/user-header.js b/components/user-header.js index b6ad5aa5..11e10027 100644 --- a/components/user-header.js +++ b/components/user-header.js @@ -71,15 +71,10 @@ function HeaderPhoto ({ user, isMe }) { } } }) - }, - onCompleted ({ setPhoto: photoId }) { - const src = `https://${process.env.NEXT_PUBLIC_MEDIA_DOMAIN}/${user.photoId}` - setSrc(src) } } ) - const initialSrc = user.photoId ? `https://${process.env.NEXT_PUBLIC_MEDIA_DOMAIN}/${user.photoId}` : '/dorian400.jpg' - const [src, setSrc] = useState(initialSrc) + const src = user.photoId ? `https://${process.env.NEXT_PUBLIC_MEDIA_DOMAIN}/${user.photoId}` : '/dorian400.jpg' return (