]> Untitled Git - lemmy-ui.git/commitdiff
Make sure user is logged in for site creation. Fixes #838 (#858)
authorDessalines <dessalines@users.noreply.github.com>
Fri, 18 Nov 2022 00:20:25 +0000 (19:20 -0500)
committerGitHub <noreply@github.com>
Fri, 18 Nov 2022 00:20:25 +0000 (19:20 -0500)
src/shared/components/home/setup.tsx

index 8da196ca403426ecdad178d6e742144ee25a3e8d..943e74a19a507e7cb6355a038d8392f534c36371 100644 (file)
@@ -209,6 +209,9 @@ export class Setup extends Component<any, State> {
       let data = wsJsonToRes<LoginResponse>(msg, LoginResponse);
       this.setState({ userLoading: false });
       UserService.Instance.login(data);
+      if (UserService.Instance.jwtInfo.isSome()) {
+        this.setState({ doneRegisteringUser: true });
+      }
     } else if (op == UserOperation.CreateSite) {
       window.location.href = "/";
     }