mirror of
https://github.com/MODSetter/SurfSense.git
synced 2026-04-28 18:36:23 +02:00
fix: replace window.location with router.push for client-side navigation
This commit is contained in:
parent
553843ab06
commit
67ee8f4bb7
2 changed files with 5 additions and 9 deletions
|
|
@ -40,19 +40,13 @@ export function UserDropdown({
|
|||
|
||||
await logout();
|
||||
|
||||
router.push("/");
|
||||
router.push(getLoginPath());
|
||||
router.refresh();
|
||||
if (typeof window !== "undefined") {
|
||||
window.location.href = getLoginPath();
|
||||
}
|
||||
} catch (error) {
|
||||
console.error("Error during logout:", error);
|
||||
await logout();
|
||||
router.push("/");
|
||||
router.push(getLoginPath());
|
||||
router.refresh();
|
||||
if (typeof window !== "undefined") {
|
||||
window.location.href = getLoginPath();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue