Skip to content

Commit

Permalink
change quickButtons reducer to replace the buttons with the new incom…
Browse files Browse the repository at this point in the history
…ing ones
  • Loading branch information
mcallegari10 committed May 14, 2020
1 parent 5cd94ed commit 6c1800e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/store/reducers/quickButtonsReducer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ const initialState = {
};

const quickButtonsReducer = {
[SET_QUICK_BUTTONS]: (state: QuickButtonsState, { buttons }) =>
({ quickButtons: [...state.quickButtons, ...buttons.map((button: QuickButton) => createQuickButton(button))] })
[SET_QUICK_BUTTONS]: (_: QuickButtonsState, { buttons }) =>
({ quickButtons: [...buttons.map((button: QuickButton) => createQuickButton(button))] })
}

export default (state = initialState, action: QuickButtonsActions) => createReducer(quickButtonsReducer, state, action);

0 comments on commit 6c1800e

Please sign in to comment.