From b97b5e97f2b021dfe5cd941e1584669609e936d8 Mon Sep 17 00:00:00 2001 From: Wyatt Johnson Date: Wed, 18 Oct 2017 12:23:16 -0600 Subject: [PATCH] load username from graph and not auth --- client/coral-settings/containers/ProfileContainer.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/client/coral-settings/containers/ProfileContainer.js b/client/coral-settings/containers/ProfileContainer.js index 9fdd4454c..2be50feac 100644 --- a/client/coral-settings/containers/ProfileContainer.js +++ b/client/coral-settings/containers/ProfileContainer.js @@ -53,7 +53,7 @@ class ProfileContainer extends Component { }; render() { - const {auth, auth: {user}, showSignInDialog, root, data} = this.props; + const {auth, auth: {user: authUser}, showSignInDialog, root, data} = this.props; const {me} = this.props.root; const loading = this.props.data.loading; @@ -65,14 +65,14 @@ class ProfileContainer extends Component { return ; } - const localProfile = user.profiles.find( + const localProfile = authUser.profiles.find( (p) => p.provider === 'local' ); const emailAddress = localProfile && localProfile.id; return (
-

{user.username}

+

{me.username}

{emailAddress ?

{emailAddress}

: null}
-

{t('framework.my_comments')}

{me.comments.nodes.length ? @@ -140,6 +139,7 @@ const withProfileQuery = withQuery( query CoralEmbedStream_Profile { me { id + username comments(query: {limit: 10}) { ...TalkSettings_CommentConnectionFragment }