fix(sidebar): redirect to splash screen after logout
This commit is contained in:
@@ -44,7 +44,7 @@ export function SidebarScreen() {
|
||||
const handleLogoutClick = () => {
|
||||
authDispatch({ type: "AuthReset" });
|
||||
userDispatch({ type: "UserLogout" });
|
||||
router.replace(ROUTES.chat);
|
||||
router.replace(ROUTES.splash);
|
||||
};
|
||||
|
||||
// 状态派生:未登录 / 已登录未 VIP / 已登录 VIP
|
||||
|
||||
@@ -1,12 +1,5 @@
|
||||
/**
|
||||
* 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";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user