fix(frontend): resolve all eslint errors to zero (B1)

This commit is contained in:
2026-09-15 11:39:21 +08:00
parent 29167d3cea
commit a427aa1c4a
9 changed files with 56 additions and 9 deletions
+1
View File
@@ -40,6 +40,7 @@ export function AuthProvider({ children }: { children: ReactNode }) {
useEffect(() => {
if (token && meQ.isError) {
setToken(null); // 非 401 失败也要清持久化 token,避免与 React 状态分叉导致 RequireAuth 永久加载
// eslint-disable-next-line react-hooks/set-state-in-effect -- 对「me 查询失败」异步结果的清理反应,与持久化 token 需同帧回收;改渲染期重置/事件驱动会改变鉴权失败时序,保守保留
setTok(null);
}
}, [token, meQ.isError]);