summaryrefslogtreecommitdiffstats
path: root/webapp/components/logged_in.jsx
diff options
context:
space:
mode:
authorChristopher Speller <crspeller@gmail.com>2016-03-31 10:54:40 -0400
committerChristopher Speller <crspeller@gmail.com>2016-03-31 10:58:12 -0400
commit54a064de98f43c55bed429867493e6f5c7e97379 (patch)
treeb4991a5ce3856a804ccf870bbdef41f69649e779 /webapp/components/logged_in.jsx
parentc8b2af62468c5d0906ba08d3e2a378681f99eb08 (diff)
downloadchat-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.jsx18
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>
);