aboutsummaryrefslogtreecommitdiff
path: root/modern/src/SocketController.js
diff options
context:
space:
mode:
authorAnton Tananaev <anton@traccar.org>2022-07-03 11:00:47 -0700
committerAnton Tananaev <anton@traccar.org>2022-07-03 11:00:47 -0700
commit0fb931d6b2193891eb8cefd002ef941eb6daed75 (patch)
tree18f966fb2cc04b75f10305565de968f68d6036bb /modern/src/SocketController.js
parent0ab655eb5c031e1a2aac18ef475aff6c7724b227 (diff)
downloadtrackermap-web-0fb931d6b2193891eb8cefd002ef941eb6daed75.tar.gz
trackermap-web-0fb931d6b2193891eb8cefd002ef941eb6daed75.tar.bz2
trackermap-web-0fb931d6b2193891eb8cefd002ef941eb6daed75.zip
Add simple events drawer
Diffstat (limited to 'modern/src/SocketController.js')
-rw-r--r--modern/src/SocketController.js2
1 files changed, 2 insertions, 0 deletions
diff --git a/modern/src/SocketController.js b/modern/src/SocketController.js
index 79661353..bfc0378d 100644
--- a/modern/src/SocketController.js
+++ b/modern/src/SocketController.js
@@ -10,6 +10,7 @@ import { snackBarDurationLongMs } from './common/util/duration';
import usePersistedState from './common/util/usePersistedState';
import alarm from './resources/alarm.mp3';
+import { eventsActions } from './store/events';
const SocketController = () => {
const dispatch = useDispatch();
@@ -60,6 +61,7 @@ const SocketController = () => {
dispatch(positionsActions.update(data.positions));
}
if (data.events) {
+ dispatch(eventsActions.add(data.events));
setEvents(data.events);
}
};