diff options
author | Christopher Speller <crspeller@gmail.com> | 2016-03-24 11:27:05 -0400 |
---|---|---|
committer | Christopher Speller <crspeller@gmail.com> | 2016-03-24 11:27:05 -0400 |
commit | d6a6668a39db2f78d59919686c5d7b901888da36 (patch) | |
tree | 5096fdb2935b94adc47152c99d6a234f04cda940 /webapp/components/login.jsx | |
parent | b62e29ba9cd6183551266da05b9b602a4415d738 (diff) | |
download | chat-d6a6668a39db2f78d59919686c5d7b901888da36.tar.gz chat-d6a6668a39db2f78d59919686c5d7b901888da36.tar.bz2 chat-d6a6668a39db2f78d59919686c5d7b901888da36.zip |
Modifying login not to display until it has finished checking. Caused admin console to redirect to town-square. Will be changed after user model flip.
Diffstat (limited to 'webapp/components/login.jsx')
-rw-r--r-- | webapp/components/login.jsx | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/webapp/components/login.jsx b/webapp/components/login.jsx index ad30f0619..e8180895d 100644 --- a/webapp/components/login.jsx +++ b/webapp/components/login.jsx @@ -29,6 +29,8 @@ export default class Login extends React.Component { Client.getMeLoggedIn((data) => { if (data && data.logged_in !== 'false') { browserHistory.push('/' + this.props.params.team + '/channels/town-square'); + } else { + this.setState({doneCheckLogin: true}); //eslint-disable-line react/no-did-mount-set-state } }); } @@ -37,7 +39,8 @@ export default class Login extends React.Component { } getStateFromStores() { return { - currentTeam: TeamStore.getByName(this.props.params.team) + currentTeam: TeamStore.getByName(this.props.params.team), + doneCheckLogin: false }; } onTeamChange() { @@ -45,7 +48,7 @@ export default class Login extends React.Component { } render() { const currentTeam = this.state.currentTeam; - if (currentTeam == null) { + if (currentTeam == null || !this.state.doneCheckLogin) { return <div/>; } |