summaryrefslogtreecommitdiffstats
path: root/ui/src/components/login.tsx
diff options
context:
space:
mode:
authorDessalines <tyhou13@gmx.com>2019-04-25 11:26:44 -0700
committerDessalines <tyhou13@gmx.com>2019-04-25 11:26:44 -0700
commit2cad62b5e391528a688025ce1c0f334c46710e00 (patch)
tree8d9a66a4e8ccc7e013fd79e6571d67a864958e5e /ui/src/components/login.tsx
parenta9d2cbb7f93fd036a1892adf8842a3abf70ebc18 (diff)
After signup, redirect to communities page.
Diffstat (limited to 'ui/src/components/login.tsx')
-rw-r--r--ui/src/components/login.tsx9
1 files changed, 8 insertions, 1 deletions
diff --git a/ui/src/components/login.tsx b/ui/src/components/login.tsx
index bab7b06f..f86faa2e 100644
--- a/ui/src/components/login.tsx
+++ b/ui/src/components/login.tsx
@@ -188,13 +188,20 @@ export class Login extends Component<any, State> {
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');
}
}
}
+
}