]> Untitled Git - lemmy-ui.git/commitdiff
Fixing delete acct logout bug.
authorDessalines <tyhou13@gmx.com>
Thu, 6 May 2021 16:05:34 +0000 (12:05 -0400)
committerDessalines <tyhou13@gmx.com>
Thu, 6 May 2021 16:05:34 +0000 (12:05 -0400)
src/shared/components/person.tsx

index 53de7543e4e03b5b045fb2707559d87773a9b43d..5ded454c2c0e38fc71eac15f9bf6946760e006c0 100644 (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;