refactor(auth): align auth UI and mock auth API

This commit is contained in:
zetaloop
2026-02-28 07:26:05 +08:00
parent bce99c4c54
commit f5df00df4e
11 changed files with 337 additions and 56 deletions
+2 -2
View File
@@ -25,7 +25,7 @@ interface AuthState {
themePreference: ThemePreference
user: User | null
switchRole: (role: UserRole) => void
submitVerification: (role: UserRole) => void
submitVerification: (role: UserRole, materials?: Record<string, string>) => void
approveVerification: (role: UserRole) => void
rejectVerification: (role: UserRole, reason: string) => void
setNotificationPref: (type: keyof NotificationPrefs, enabled: boolean) => void
@@ -50,7 +50,7 @@ export const useAuthStore = create<AuthState>((set, get) => ({
set({ currentRole: role })
}
},
submitVerification: (role) =>
submitVerification: (role, _materials) =>
set((state) => {
if (state.verifiedRoles.includes(role)) {
return state