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

This commit is contained in:
Dessalines 2022-11-17 19:16:02 -05:00 committed by Dessalines
parent 03045c2e04
commit b655ee0c14

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