Skip to content

Commit

Permalink
Make sure user is logged in for site creation. Fixes #838
Browse files Browse the repository at this point in the history
  • Loading branch information
dessalines committed Nov 18, 2022
1 parent ee0cdde commit 70477bd
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/shared/components/home/setup.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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 = "/";
}
Expand Down

0 comments on commit 70477bd

Please sign in to comment.