aboutsummaryrefslogtreecommitdiff
path: root/modern/src/reducers/index.js
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/index.js
parent353bd397766bb5d780e8f0877f95aa0ad492b579 (diff)
downloadetbsa-traccar-web-1461b376e41cf41cd9e49f6df200ba3f573fa127.tar.gz
etbsa-traccar-web-1461b376e41cf41cd9e49f6df200ba3f573fa127.tar.bz2
etbsa-traccar-web-1461b376e41cf41cd9e49f6df200ba3f573fa127.zip
Implement device list
Diffstat (limited to 'modern/src/reducers/index.js')
-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 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: