From b8755f83d6c232606f4ad07b86fca386b74649a5 Mon Sep 17 00:00:00 2001
From: Dessalines <dessalines@users.noreply.github.com>
Date: Thu, 17 Nov 2022 19:20:25 -0500
Subject: [PATCH] Make sure user is logged in for site creation. Fixes #838
 (#858)

---
 src/shared/components/home/setup.tsx | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/shared/components/home/setup.tsx b/src/shared/components/home/setup.tsx
index 8da196c..943e74a 100644
--- a/src/shared/components/home/setup.tsx
+++ b/src/shared/components/home/setup.tsx
@@ -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 = "/";
     }
-- 
2.44.1