From 277cd2ac37d61224dfd165769e73c7751488e1bb Mon Sep 17 00:00:00 2001
From: Dessalines <tyhou13@gmx.com>
Date: Thu, 6 May 2021 12:05:34 -0400
Subject: [PATCH] Fixing delete acct logout bug.

---
 src/shared/components/person.tsx | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/shared/components/person.tsx b/src/shared/components/person.tsx
index 53de754..5ded454 100644
--- a/src/shared/components/person.tsx
+++ b/src/shared/components/person.tsx
@@ -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;
-- 
2.44.1