mirror of
https://github.com/LemmyNet/lemmy-ui.git
synced 2024-12-25 18:36:24 +00:00
parent
8f132f67fa
commit
9a26d4bbdf
|
@ -429,7 +429,7 @@ export class Navbar extends Component<NavbarProps, NavbarState> {
|
|||
handleLogoutClick(i: Navbar) {
|
||||
i.setState({ showDropdown: false, expanded: false });
|
||||
UserService.Instance.logout();
|
||||
i.context.router.history.push("/");
|
||||
window.location.href = "/";
|
||||
location.reload();
|
||||
}
|
||||
|
||||
|
|
|
@ -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) });
|
||||
|
|
|
@ -37,7 +37,7 @@ export class UserService {
|
|||
}
|
||||
|
||||
public logout() {
|
||||
IsomorphicCookie.remove("jwt", { secure: false });
|
||||
IsomorphicCookie.remove("jwt");
|
||||
this.claims = undefined;
|
||||
this.myUserInfo = undefined;
|
||||
// setTheme();
|
||||
|
|
Loading…
Reference in a new issue