From d6a6668a39db2f78d59919686c5d7b901888da36 Mon Sep 17 00:00:00 2001 From: Christopher Speller Date: Thu, 24 Mar 2016 11:27:05 -0400 Subject: 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. --- webapp/components/admin_console/admin_navbar_dropdown.jsx | 2 +- webapp/components/login.jsx | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) (limited to 'webapp/components') 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 { >
  • { 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
    ; } -- cgit v1.2.3-1-g7c22