Skip to content

Commit

Permalink
Remove unnecessary state spreading.
Browse files Browse the repository at this point in the history
  • Loading branch information
justinkambic committed Apr 23, 2020
1 parent ef21286 commit 8412951
Showing 1 changed file with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,21 +31,19 @@ export const dynamicSettingsReducer = handleActions<DynamicSettingsState, any>(
...state,
loading: true,
}),
[String(getDynamicSettingsSuccess)]: (state, action: Action<DynamicSettings>) => ({
...state,
[String(getDynamicSettingsSuccess)]: (_state, action: Action<DynamicSettings>) => ({
loading: false,
settings: action.payload,
}),
[String(getDynamicSettingsFail)]: (state, action: Action<Error>) => ({
...state,
[String(getDynamicSettingsFail)]: (_state, action: Action<Error>) => ({
loading: false,
loadError: action.payload,
}),
[String(setDynamicSettings)]: state => ({
...state,
loading: true,
}),
[String(setDynamicSettingsSuccess)]: (state, action: Action<DynamicSettings>) => ({
[String(setDynamicSettingsSuccess)]: (_state, action: Action<DynamicSettings>) => ({
settings: action.payload,
saveSucceded: true,
loading: false,
Expand Down

0 comments on commit 8412951

Please sign in to comment.