summaryrefslogtreecommitdiffstats
path: root/webapp/components/login.jsx
diff options
context:
space:
mode:
authorChristopher Speller <crspeller@gmail.com>2016-03-24 11:27:05 -0400
committerChristopher Speller <crspeller@gmail.com>2016-03-24 11:27:05 -0400
commitd6a6668a39db2f78d59919686c5d7b901888da36 (patch)
tree5096fdb2935b94adc47152c99d6a234f04cda940 /webapp/components/login.jsx
parentb62e29ba9cd6183551266da05b9b602a4415d738 (diff)
downloadchat-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.jsx7
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/>;
}