Navigate away from login page if already logged in.

- Fixes #370
This commit is contained in:
Dessalines 2021-09-19 15:45:58 -04:00
parent bf93e29f4c
commit b31c464e91

View file

@ -76,6 +76,13 @@ export class Login extends Component<any, State> {
}
}
componentDidMount() {
// Navigate to home if already logged in
if (UserService.Instance.myUserInfo) {
this.context.router.history.push("/");
}
}
componentWillUnmount() {
if (isBrowser()) {
this.subscription.unsubscribe();