diff options
author | Anton Tananaev <anton@traccar.org> | 2022-06-07 07:20:51 -0700 |
---|---|---|
committer | Anton Tananaev <anton@traccar.org> | 2022-06-07 07:20:51 -0700 |
commit | 193587e0393f4a2228406cd7d4e5e387eab83d97 (patch) | |
tree | 774096bff046b6555ff0561b48e657e1c4322d82 /modern/src/SocketController.js | |
parent | 66a449245f6d81113caa1ce605ce0b50f867835b (diff) | |
download | trackermap-web-193587e0393f4a2228406cd7d4e5e387eab83d97.tar.gz trackermap-web-193587e0393f4a2228406cd7d4e5e387eab83d97.tar.bz2 trackermap-web-193587e0393f4a2228406cd7d4e5e387eab83d97.zip |
Display formatted notification
Diffstat (limited to 'modern/src/SocketController.js')
-rw-r--r-- | modern/src/SocketController.js | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/modern/src/SocketController.js b/modern/src/SocketController.js index 50f43931..3e6e6783 100644 --- a/modern/src/SocketController.js +++ b/modern/src/SocketController.js @@ -6,7 +6,6 @@ import { useNavigate } from 'react-router-dom'; import { positionsActions, devicesActions, sessionActions } from './store'; import { useEffectAsync } from './reactHelper'; import { useTranslation } from './common/components/LocalizationProvider'; -import { prefixString } from './common/util/stringUtils'; import { snackBarDurationLongMs } from './common/util/duration'; import usePersistedState from './common/util/usePersistedState'; @@ -103,7 +102,7 @@ const SocketController = () => { useEffect(() => { setNotifications(events.map((event) => ({ id: event.id, - message: `${devices[event.deviceId]?.name}: ${t(prefixString('event', event.type))}`, + message: event.attributes.message, show: true, }))); }, [events, devices, t]); |