relay-management-latest #75

Merged
y merged 9 commits from relay-management-latest into main 2024-05-24 13:48:01 +00:00
2 changed files with 19 additions and 1 deletions
Showing only changes of commit ad69504278 - Show all commits

View File

@ -16,3 +16,9 @@ export interface RestoreState {
type: typeof ActionTypes.RESTORE_STATE type: typeof ActionTypes.RESTORE_STATE
payload: State payload: State
} }
export const userLogOutAction = () => {
return {
type: ActionTypes.USER_LOGOUT
}
}

View File

@ -6,6 +6,7 @@ import metadataReducer from './metadata/reducer'
import userRobotImageReducer from './userRobotImage/reducer' import userRobotImageReducer from './userRobotImage/reducer'
import { RelaysState } from './relays/types' import { RelaysState } from './relays/types'
import relaysReducer from './relays/reducer' import relaysReducer from './relays/reducer'
import * as ActionTypes from './actionTypes'
export interface State { export interface State {
auth: AuthState auth: AuthState
@ -14,9 +15,20 @@ export interface State {
relays: RelaysState relays: RelaysState
} }
export default combineReducers({ export const appReducer = combineReducers({
Review

Have you addressed the case where it was being imported as default import?

Have you addressed the case where it was being imported as default import?
Review

yes

yes
auth: authReducer, auth: authReducer,
metadata: metadataReducer, metadata: metadataReducer,
userRobotImage: userRobotImageReducer, userRobotImage: userRobotImageReducer,
relays: relaysReducer relays: relaysReducer
}) })
// FIXME: define types
export default (state: any, action: any) => {
switch (action.type) {
case ActionTypes.USER_LOGOUT:
return appReducer(undefined, action)
default:
return appReducer(state, action)
}
}