aboutsummaryrefslogtreecommitdiff
path: root/modern/src/SocketController.js
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2020-06-21 17:42:00 -0700
committerAnton Tananaev <anton.tananaev@gmail.com>2020-06-21 17:42:00 -0700
commitd3a027a92958371acaf35d300770a4c864df7231 (patch)
tree0f6d28e5cd6603231f7db0c0d9d407687b649cbc /modern/src/SocketController.js
parent0de52345ecb1bc9137a3d5df1fe753917b677314 (diff)
downloadtrackermap-web-d3a027a92958371acaf35d300770a4c864df7231.tar.gz
trackermap-web-d3a027a92958371acaf35d300770a4c864df7231.tar.bz2
trackermap-web-d3a027a92958371acaf35d300770a4c864df7231.zip
Implement device removal
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 6de3369a..13ff0a9d 100644
--- a/modern/src/SocketController.js
+++ b/modern/src/SocketController.js
@@ -20,7 +20,7 @@ const displayNotifications = events => {
}
};
-const SocketController = (props) => {
+const SocketController = () => {
const dispatch = useDispatch();
const connectSocket = () => {
@@ -34,10 +34,10 @@ const SocketController = (props) => {
socket.onmessage = (event) => {
const data = JSON.parse(event.data);
if (data.devices) {
- props.dispatch(devicesActions.update(data.devices));
+ dispatch(devicesActions.update(data.devices));
}
if (data.positions) {
- props.dispatch(positionsActions.update(data.positions));
+ dispatch(positionsActions.update(data.positions));
}
if (data.events) {
displayNotifications(data.events);