From 6c1800eaf16d7520aba98a97d9993a1f1fc8b1e2 Mon Sep 17 00:00:00 2001 From: mcallegari10 Date: Thu, 14 May 2020 11:21:45 -0300 Subject: [PATCH] change quickButtons reducer to replace the buttons with the new incoming ones --- src/store/reducers/quickButtonsReducer.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/store/reducers/quickButtonsReducer.ts b/src/store/reducers/quickButtonsReducer.ts index 178da2ae0..7153de854 100644 --- a/src/store/reducers/quickButtonsReducer.ts +++ b/src/store/reducers/quickButtonsReducer.ts @@ -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);