aboutsummaryrefslogtreecommitdiff
path: root/vnext/src/components/Avatar.js
diff options
context:
space:
mode:
Diffstat (limited to 'vnext/src/components/Avatar.js')
-rw-r--r--vnext/src/components/Avatar.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/vnext/src/components/Avatar.js b/vnext/src/components/Avatar.js
index 67d75c5e..64c16ead 100644
--- a/vnext/src/components/Avatar.js
+++ b/vnext/src/components/Avatar.js
@@ -15,6 +15,7 @@ let isMounted;
function Avatar(props) {
const [user, setUser] = useState(props.user);
useEffect(() => {
+ setUser(props.user);
isMounted = true;
if (!user.uid && user.uri) {
fetchUserUri(user.uri).then(response => {
@@ -26,7 +27,7 @@ function Avatar(props) {
isMounted = false;
};
}
- });
+ }, [props.user]);
return (
<div className="Avatar" style={props.style}>
<div className="msg-avatar">