diff options
author | Harrison Healey <harrisonmhealey@gmail.com> | 2016-03-31 13:01:05 -0400 |
---|---|---|
committer | Harrison Healey <harrisonmhealey@gmail.com> | 2016-03-31 13:01:05 -0400 |
commit | 36f611fac48536f26770357de8d5b6767bd46d2f (patch) | |
tree | b92ca8dc6e9593eee054f7bd73e185735b6a6209 /webapp/components/logged_in.jsx | |
parent | 720947e17e4e7820dcae6c5e25b5fe8485a7fc6c (diff) | |
parent | 54a064de98f43c55bed429867493e6f5c7e97379 (diff) | |
download | chat-36f611fac48536f26770357de8d5b6767bd46d2f.tar.gz chat-36f611fac48536f26770357de8d5b6767bd46d2f.tar.bz2 chat-36f611fac48536f26770357de8d5b6767bd46d2f.zip |
Merge pull request #2594 from mattermost/plt-2476
PLT-2476 Fixing username display in center channel
Diffstat (limited to 'webapp/components/logged_in.jsx')
-rw-r--r-- | webapp/components/logged_in.jsx | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/webapp/components/logged_in.jsx b/webapp/components/logged_in.jsx index 3b44f5940..0c4571083 100644 --- a/webapp/components/logged_in.jsx +++ b/webapp/components/logged_in.jsx @@ -47,11 +47,12 @@ export default class LoggedIn extends React.Component { this.onUserChanged = this.onUserChanged.bind(this); this.state = { - user: null + user: null, + profiles: null }; } isValidState() { - return this.state.user != null; + return this.state.user != null && this.state.profiles != null; } onUserChanged() { // Grab the current user @@ -84,7 +85,13 @@ export default class LoggedIn extends React.Component { browserHistory.push(Utils.getTeamURLFromAddressBar() + '/tutorial'); } - this.setState({user}); + // Get profiles + const profiles = UserStore.getProfiles(); + + this.setState({ + user, + profiles + }); } componentWillMount() { // Emit view action @@ -232,7 +239,10 @@ export default class LoggedIn extends React.Component { </div> </div> <div className='row main'> - {this.props.center} + {React.cloneElement(this.props.center, { + user: this.state.user, + profiles: this.state.profiles + })} </div> </div> ); |