mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-04-27 09:46:25 +02:00
use hard navigation on login and logout to clear state
This commit is contained in:
parent
348898b08b
commit
5151ba381e
2 changed files with 19 additions and 53 deletions
|
|
@ -34,14 +34,14 @@ export function UserDropdown({
|
|||
|
||||
if (typeof window !== "undefined") {
|
||||
localStorage.removeItem("surfsense_bearer_token");
|
||||
router.push("/");
|
||||
window.location.href = "/";
|
||||
}
|
||||
} catch (error) {
|
||||
console.error("Error during logout:", error);
|
||||
// Optionally, provide user feedback
|
||||
if (typeof window !== "undefined") {
|
||||
alert("Logout failed. Please try again.");
|
||||
router.push("/");
|
||||
window.location.href = "/";
|
||||
}
|
||||
}
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue