diff --git a/frontend/app/Router.js b/frontend/app/Router.js index 662a7a7a7..81fcaefc3 100644 --- a/frontend/app/Router.js +++ b/frontend/app/Router.js @@ -120,8 +120,6 @@ class Router extends React.Component { super(props); if (props.isLoggedIn) { this.fetchInitialData(); - } else { - props.fetchTenants(); } } diff --git a/frontend/app/components/Login/Login.js b/frontend/app/components/Login/Login.js index b51970036..05702a2fe 100644 --- a/frontend/app/components/Login/Login.js +++ b/frontend/app/components/Login/Login.js @@ -11,6 +11,7 @@ import cn from 'classnames'; import { setJwt } from 'Duck/user'; import LoginBg from '../../svg/login-illustration.svg'; import { ENTERPRISE_REQUEIRED } from 'App/constants'; +import { fetchTenants } from 'Duck/user'; const FORGOT_PASSWORD = forgotPassword(); const SIGNUP_ROUTE = signup(); @@ -24,7 +25,7 @@ export default authDetails: state.getIn(['user', 'authDetails']), params: new URLSearchParams(props.location.search), }), - { login, setJwt } + { login, setJwt, fetchTenants } ) @withPageTitle('Login - OpenReplay') @withRouter @@ -37,6 +38,7 @@ class Login extends React.Component { componentDidMount() { const { params } = this.props; + this.props.fetchTenants(); const jwt = params.get('jwt'); if (jwt) { this.props.setJwt(jwt);