diff options
Diffstat (limited to 'vnext/src/components/Avatar.js')
-rw-r--r-- | vnext/src/components/Avatar.js | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/vnext/src/components/Avatar.js b/vnext/src/components/Avatar.js index d4e83b7b..fed68ed1 100644 --- a/vnext/src/components/Avatar.js +++ b/vnext/src/components/Avatar.js @@ -17,11 +17,17 @@ function Avatar(props) { useEffect(() => { setUser(props.user); isMounted = true; - + if (!user.uid && !user.uname, user.uri) { + fetchUserUri(user.uri).then(response => { + if (isMounted) { + setUser(response.data); + } + }); + } return () => { isMounted = false; }; - }, [props.user, user.uid, user.uri]); + }, [props.user]); return ( <div className="Avatar" style={props.style}> <div className="msg-avatar"> |