aboutsummaryrefslogtreecommitdiff
path: root/modern/src/reducers
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2018-09-08 11:40:01 +1200
committerAnton Tananaev <anton.tananaev@gmail.com>2018-09-08 11:40:01 +1200
commit1461b376e41cf41cd9e49f6df200ba3f573fa127 (patch)
tree7d9aef29ef8f3b812ae75fe86d3b322185028500 /modern/src/reducers
parent353bd397766bb5d780e8f0877f95aa0ad492b579 (diff)
downloadtrackermap-web-1461b376e41cf41cd9e49f6df200ba3f573fa127.tar.gz
trackermap-web-1461b376e41cf41cd9e49f6df200ba3f573fa127.tar.bz2
trackermap-web-1461b376e41cf41cd9e49f6df200ba3f573fa127.zip
Implement device list
Diffstat (limited to 'modern/src/reducers')
-rw-r--r--modern/src/reducers/index.js6
1 files changed, 6 insertions, 0 deletions
diff --git a/modern/src/reducers/index.js b/modern/src/reducers/index.js
index b9c94771..962d83c2 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: