fix(auth): redirect to splash after logout

This commit is contained in:
2026-06-17 15:07:16 +08:00
parent 0d2a515e51
commit bda1605ce7
7 changed files with 48 additions and 5 deletions
+1
View File
@@ -9,6 +9,7 @@ export type UserEvent =
| { type: "UserUpdate"; user: UserView }
| { type: "UserUpdateUsername"; username: string }
| { type: "UserUpdatePronouns"; pronouns: string }
| { type: "UserClearLocal" }
| { type: "UserLogout" }
| { type: "UserDeleteChatHistory" }
| { type: "UserDeleteAccount" };
+4 -1
View File
@@ -70,6 +70,9 @@ export const userMachine = setup({
UserUpdatePronouns: {
actions: "updatePronouns",
},
UserClearLocal: {
actions: "clearUser",
},
UserLogout: "loggingOut",
UserDeleteChatHistory: {},
UserDeleteAccount: {},
@@ -125,4 +128,4 @@ export const userMachine = setup({
},
});
export type UserMachine = typeof userMachine;
export type UserMachine = typeof userMachine;