summaryrefslogtreecommitdiffstats
path: root/webapp/components
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
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')
-rw-r--r--webapp/components/admin_console/admin_navbar_dropdown.jsx2
-rw-r--r--webapp/components/login.jsx7
2 files changed, 6 insertions, 3 deletions
diff --git a/webapp/components/admin_console/admin_navbar_dropdown.jsx b/webapp/components/admin_console/admin_navbar_dropdown.jsx
index 9644a2e7f..527f97959 100644
--- a/webapp/components/admin_console/admin_navbar_dropdown.jsx
+++ b/webapp/components/admin_console/admin_navbar_dropdown.jsx
@@ -64,7 +64,7 @@ export default class AdminNavbarDropdown extends React.Component {
>
<li>
<Link
- to={Utils.getWindowLocationOrigin() + '/' + this.state.currentTeam.name}
+ to={Utils.getWindowLocationOrigin() + '/' + this.state.currentTeam.name + '/channels/town-square'}
>
<FormattedMessage
id='admin.nav.switch'
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/>;
}