diff --git a/frontend/app/Router.js b/frontend/app/Router.js index 643351d67..a4051502c 100644 --- a/frontend/app/Router.js +++ b/frontend/app/Router.js @@ -86,15 +86,11 @@ class Router extends React.Component { } componentDidUpdate(prevProps) { - if (prevProps.email !== this.props.email) { - this.onLoginLogout(); + if (prevProps.email !== this.props.email && !this.props.email) { + this.props.fetchTenants(); } } - onLoginLogout() { - const { email, account, organisation } = this.props; - } - render() { const { isLoggedIn, jwt, siteId, sites, loading, changePassword, location, existingTenant, onboarding } = this.props; const siteIdList = sites.map(({ id }) => id).toJS();