Fixing delete acct logout bug.

This commit is contained in:
Dessalines 2021-05-06 12:05:34 -04:00
parent b0e456d754
commit 277cd2ac37

View file

@ -1179,7 +1179,6 @@ export class Person extends Component<any, PersonState> {
WebSocketService.Instance.send(
wsClient.deleteAccount(i.state.deleteAccountForm)
);
i.handleLogoutClick(i);
}
setUserInfo() {
@ -1273,7 +1272,8 @@ export class Person extends Component<any, PersonState> {
deleteAccountLoading: false,
deleteAccountShowConfirm: false,
});
this.context.router.history.push("/");
UserService.Instance.logout();
window.location.href = "/";
} else if (op == UserOperation.AddAdmin) {
let data = wsJsonToRes<AddAdminResponse>(msg).data;
this.state.siteRes.admins = data.admins;