Make sure user is logged in for site creation. Fixes #838 (#858)

This commit is contained in:
Dessalines 2022-11-17 19:20:25 -05:00 committed by GitHub
parent 03045c2e04
commit b8755f83d6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View 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 = "/";
}