diff options
author | Christopher Speller <crspeller@gmail.com> | 2016-03-31 10:54:40 -0400 |
---|---|---|
committer | Christopher Speller <crspeller@gmail.com> | 2016-03-31 10:58:12 -0400 |
commit | 54a064de98f43c55bed429867493e6f5c7e97379 (patch) | |
tree | b4991a5ce3856a804ccf870bbdef41f69649e779 /webapp/components/logged_in.jsx | |
parent | c8b2af62468c5d0906ba08d3e2a378681f99eb08 (diff) | |
download | chat-54a064de98f43c55bed429867493e6f5c7e97379.tar.gz chat-54a064de98f43c55bed429867493e6f5c7e97379.tar.bz2 chat-54a064de98f43c55bed429867493e6f5c7e97379.zip |
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 f7a6be647..a4fd3a9ce 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> ); |