mirror of
https://github.com/Sagit-chu/flvx.git
synced 2026-10-07 10:16:38 +08:00
fix: ensure page refresh to login page upon logout (#465)
This commit is contained in:
@@ -2,8 +2,9 @@ import { clearSession } from "@/utils/session";
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 安全退出登录函数
|
* 安全退出登录函数
|
||||||
* 清除登录相关数据,但保留用户偏好设置(如主题)
|
* 清除登录相关数据,并强制刷新跳转到首页
|
||||||
*/
|
*/
|
||||||
export const safeLogout = () => {
|
export const safeLogout = () => {
|
||||||
clearSession();
|
clearSession();
|
||||||
|
window.location.href = "/";
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user