diff --git a/ui/src/components/login.tsx b/ui/src/components/login.tsx index bab7b06f4..f86faa2e1 100644 --- a/ui/src/components/login.tsx +++ b/ui/src/components/login.tsx @@ -188,13 +188,20 @@ export class Login extends Component { this.setState(this.state); return; } else { - if (op == UserOperation.Register || op == UserOperation.Login) { + if (op == UserOperation.Login) { this.state.loginLoading = false; this.state.registerLoading = false; let res: LoginResponse = msg; UserService.Instance.login(res); this.props.history.push('/'); + } else if (op == UserOperation.Register) { + this.state.loginLoading = false; + this.state.registerLoading = false; + let res: LoginResponse = msg; + UserService.Instance.login(res); + this.props.history.push('/communities'); } } } + }