fix(sidebar): redirect to splash screen after logout

This commit is contained in:
2026-06-17 14:35:28 +08:00
parent 1d7d9cfbfc
commit 0d2a515e51
2 changed files with 1 additions and 8 deletions
+1 -1
View File
@@ -44,7 +44,7 @@ export function SidebarScreen() {
const handleLogoutClick = () => { const handleLogoutClick = () => {
authDispatch({ type: "AuthReset" }); authDispatch({ type: "AuthReset" });
userDispatch({ type: "UserLogout" }); userDispatch({ type: "UserLogout" });
router.replace(ROUTES.chat); router.replace(ROUTES.splash);
}; };
// 状态派生:未登录 / 已登录未 VIP / 已登录 VIP // 状态派生:未登录 / 已登录未 VIP / 已登录 VIP
-7
View File
@@ -1,12 +1,5 @@
/** /**
* Auth 状态机:Actors(异步服务) * Auth 状态机:Actors(异步服务)
*
* 原始 Dart: lib/ui/auth/bloc/auth_bloc.dart + auth_state.dart + auth_event.dart
*
* 本轮迁移:所有认证登录调用(含 OAuth 社交登录)统一收口到状态机内。
* 业务层只派发事件(`AuthEmailLoginSubmitted` / `AuthGoogleLoginSubmitted` / 等),
* 状态机通过 actors 调 `authRepository`(邮箱 / OAuth token sync)或
* `next-auth/react.signIn`OAuth 跳转)。
*/ */
import { fromPromise } from "xstate"; import { fromPromise } from "xstate";