From 1461b376e41cf41cd9e49f6df200ba3f573fa127 Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Sat, 8 Sep 2018 11:40:01 +1200 Subject: Implement device list --- modern/src/reducers/index.js | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'modern/src/reducers/index.js') diff --git a/modern/src/reducers/index.js b/modern/src/reducers/index.js index b9c9477..962d83c 100644 --- a/modern/src/reducers/index.js +++ b/modern/src/reducers/index.js @@ -6,8 +6,14 @@ const initialState = { function rootReducer(state = initialState, action) { switch (action.type) { + case 'UPDATE_DEVICES': + return Object.assign({}, { + ...state, + devices: [...state.devices, ...action.devices] + }); case 'UPDATE_POSITIONS': return Object.assign({}, { + ...state, positions: [...state.positions, ...action.positions] }); default: -- cgit v1.2.3