]> Untitled Git - lemmy-ui.git/blobdiff - src/shared/components/person/settings.tsx
Fix logout bug. Fixes #391 (#424)
[lemmy-ui.git] / src / shared / components / person / settings.tsx
index 0ab7ef629eb490f46ddaefe52d454e0504426c01..2990fa2497fddf4f07046256501e07da4a5e1646 100644 (file)
@@ -1035,9 +1035,10 @@ export class Settings extends Component<any, SettingsState> {
     i.setState(i.state);
   }
 
-  handleLogoutClick(i: Settings) {
+  handleLogoutClick(_i: Settings) {
     UserService.Instance.logout();
-    i.context.router.history.push("/");
+    window.location.href = "/";
+    location.reload();
   }
 
   handleDeleteAccount(i: Settings, event: any) {
@@ -1119,6 +1120,7 @@ export class Settings extends Component<any, SettingsState> {
       });
       UserService.Instance.logout();
       window.location.href = "/";
+      location.reload();
     } else if (op == UserOperation.BlockPerson) {
       let data = wsJsonToRes<BlockPersonResponse>(msg).data;
       this.setState({ personBlocks: updatePersonBlock(data) });