From 2cad62b5e391528a688025ce1c0f334c46710e00 Mon Sep 17 00:00:00 2001
From: Dessalines <tyhou13@gmx.com>
Date: Thu, 25 Apr 2019 11:26:44 -0700
Subject: After signup, redirect to communities page.

---
 ui/src/components/login.tsx | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

(limited to 'ui/src/components/login.tsx')

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');
       }
     }
   }
+
 }
-- 
cgit v1.2.3

