]> Untitled Git - lemmy.git/commitdiff
After signup, redirect to communities page.
authorDessalines <tyhou13@gmx.com>
Thu, 25 Apr 2019 18:26:44 +0000 (11:26 -0700)
committerDessalines <tyhou13@gmx.com>
Thu, 25 Apr 2019 18:26:44 +0000 (11:26 -0700)
ui/src/components/login.tsx

index bab7b06f498ba789bb0d664b7db46d80f8cb5d43..f86faa2e12267bec12c9502137e7f5d3ca56cb28 100644 (file)
@@ -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');
       }
     }
   }
+
 }