const initialState = { userProfileSettings: [], }; const userProfileSettings = (state = initialState, action) => { switch (action.type) { case "GET_USERPROFILESETTING": return { ...state, userProfileSettings: action.payload.getUserProfileSettings, }; case "UPDATE_USERPROFILESETTING": return { ...state, userProfileSettings: action.payload.data, }; default: return state; } }; export default userProfileSettings;