aboutsummaryrefslogtreecommitdiff
path: root/modern/src/SocketController.js
diff options
context:
space:
mode:
authorAnton Tananaev <anton@traccar.org>2022-04-17 15:59:50 -0700
committerAnton Tananaev <anton@traccar.org>2022-04-17 15:59:50 -0700
commiteecd28e9513c0376afac4adc4b21fa056efe4230 (patch)
treed15fb6d062e6478eaba7f453dbe18feff7e25f7a /modern/src/SocketController.js
parentad8484a08ef7eabb41afb33a9774ba8502da1d53 (diff)
downloadtrackermap-web-eecd28e9513c0376afac4adc4b21fa056efe4230.tar.gz
trackermap-web-eecd28e9513c0376afac4adc4b21fa056efe4230.tar.bz2
trackermap-web-eecd28e9513c0376afac4adc4b21fa056efe4230.zip
Add announcement snackbar
Diffstat (limited to 'modern/src/SocketController.js')
-rw-r--r--modern/src/SocketController.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/modern/src/SocketController.js b/modern/src/SocketController.js
index cb16bf89..28ca29ab 100644
--- a/modern/src/SocketController.js
+++ b/modern/src/SocketController.js
@@ -7,6 +7,7 @@ import { positionsActions, devicesActions, sessionActions } from './store';
import { useEffectAsync } from './reactHelper';
import { useTranslation } from './LocalizationProvider';
import { prefixString } from './common/stringUtils';
+import { snackBarDurationLongMs } from './common/duration';
const SocketController = () => {
const dispatch = useDispatch();
@@ -93,7 +94,7 @@ const SocketController = () => {
}}
open={notification.show}
message={notification.message}
- autoHideDuration={5000}
+ autoHideDuration={snackBarDurationLongMs}
onClose={() => setEvents(events.filter((e) => e.id !== notification.id))}
/>
))}