aboutsummaryrefslogtreecommitdiff
path: root/modern/src/SocketController.js
diff options
context:
space:
mode:
authorAnton Tananaev <anton@traccar.org>2022-10-28 17:08:59 -0700
committerAnton Tananaev <anton@traccar.org>2022-10-28 17:08:59 -0700
commit6a4eba7b63c84c20188b8a6b16f6107698bfde91 (patch)
treee486dbb32afadee5c2e2c7151d963871820eeb4f /modern/src/SocketController.js
parent17b990eabe36138a4a879deef8d03b16ee27e1ba (diff)
downloadtrackermap-web-6a4eba7b63c84c20188b8a6b16f6107698bfde91.tar.gz
trackermap-web-6a4eba7b63c84c20188b8a6b16f6107698bfde91.tar.bz2
trackermap-web-6a4eba7b63c84c20188b8a6b16f6107698bfde91.zip
Move positions to session
Diffstat (limited to 'modern/src/SocketController.js')
-rw-r--r--modern/src/SocketController.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/modern/src/SocketController.js b/modern/src/SocketController.js
index 970298c3..521ad54d 100644
--- a/modern/src/SocketController.js
+++ b/modern/src/SocketController.js
@@ -2,7 +2,7 @@ import React, { useEffect, useRef, useState } from 'react';
import { useDispatch, useSelector, connect } from 'react-redux';
import { Snackbar } from '@mui/material';
-import { positionsActions, devicesActions, sessionActions } from './store';
+import { devicesActions, sessionActions } from './store';
import { useEffectAsync } from './reactHelper';
import { useTranslation } from './common/components/LocalizationProvider';
import { snackBarDurationLongMs } from './common/util/duration';
@@ -52,7 +52,7 @@ const SocketController = () => {
headers: { 'Content-Type': 'application/json' },
});
if (positionsResponse.ok) {
- dispatch(positionsActions.update(await positionsResponse.json()));
+ dispatch(sessionActions.updatePositions(await positionsResponse.json()));
}
} catch (error) {
// ignore errors
@@ -67,7 +67,7 @@ const SocketController = () => {
dispatch(devicesActions.update(data.devices));
}
if (data.positions) {
- dispatch(positionsActions.update(data.positions));
+ dispatch(sessionActions.updatePositions(data.positions));
}
if (data.events) {
if (!features.disableEvents) {