Skip to content
Snippets Groups Projects
Commit 5a641af7 authored by Nithya Santhanam's avatar Nithya Santhanam
Browse files

TMSS:814: Fixed redirecting to Login page

parent abb55eb8
Branches
Tags
3 merge requests!634WIP: COBALT commissioning delta,!535Resolves TMSS-814,!481Draft: SW-971 SW-973 SW-975: Various fixes to build LOFAR correctly.
......@@ -47,9 +47,9 @@ class App extends Component {
staticMenuInactive: localStorage.getItem('staticMenuInactive') === 'true' ? true : false,
overlayMenuActive: localStorage.getItem('overlayMenuActive') === 'true' ? true : false,
mobileMenuActive: localStorage.getItem('mobileMenuActive') === 'true' ? true : false,
authenticated: Auth.isAuthenticated(),
authenticated: true,
findObjectPlaceholder: 'Sub Task',
redirect: (Auth.isAuthenticated() && window.location.pathname === "/login")?"/":window.location.pathname,
redirect: window.location.pathname,
isLogin: true
};
this.onWrapperClick = this.onWrapperClick.bind(this);
......
......@@ -23,7 +23,7 @@ class AuthComponent extends Component {
async componentDidUpdate(prevProp, prevState) {
const authenticate = await Auth.isAuthenticated();
if(prevState.authenticated != authenticate){
this.setState({authenticated: authenticate, isLogin: authenticate});
this.setState({authenticated: authenticate, isLoginProgress: authenticate});
}
}
......@@ -41,7 +41,7 @@ class AuthComponent extends Component {
<Redirect to={{pathname: "/login"}} />
<Login onLogin={this.loggedIn} />
</Router>
};
}
</>
}
</>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment