"feat: enhance user authentication flow with loading state, improved reducer handling, and login/logout actions"

This commit is contained in:
louiscklaw
2025-06-04 11:31:36 +08:00
parent df9992454b
commit b78709db9b
9 changed files with 130 additions and 35 deletions

View File

@@ -15,11 +15,9 @@ export function userReducer(state: UserState, action: UserActions): UserState {
return { ...state, darkMode: action.darkMode };
case 'set-is-loggedin':
return { ...state, isLoggedin: action.loggedIn };
case 'set-access-token':
return { ...state, token: action.token };
case 'check-user-session':
return { ...state, isSessionValid: action.sessionValid };
// case 'set-active-session':
// return { ...state, session: action.session };
// case 'set-access-token':
// return { ...state, token: action.token };
}
}