aboutsummaryrefslogtreecommitdiff
path: root/modern/src/common/components/StatusCard.jsx
diff options
context:
space:
mode:
authorAnton Tananaev <anton@traccar.org>2023-11-25 14:23:39 -0800
committerAnton Tananaev <anton@traccar.org>2023-11-25 14:23:39 -0800
commit43e6573b86ae3d015fd082280e3692711caec9fb (patch)
tree31cc90616aba405ec689eae77435c9fa39941ee0 /modern/src/common/components/StatusCard.jsx
parent4a7ab9a9b45a43b285e5d649d8f25e821f376ac3 (diff)
downloadtrackermap-web-43e6573b86ae3d015fd082280e3692711caec9fb.tar.gz
trackermap-web-43e6573b86ae3d015fd082280e3692711caec9fb.tar.bz2
trackermap-web-43e6573b86ae3d015fd082280e3692711caec9fb.zip
Auto dismiss confirmation
Diffstat (limited to 'modern/src/common/components/StatusCard.jsx')
-rw-r--r--modern/src/common/components/StatusCard.jsx8
1 files changed, 7 insertions, 1 deletions
diff --git a/modern/src/common/components/StatusCard.jsx b/modern/src/common/components/StatusCard.jsx
index 2e936420..fcd62a41 100644
--- a/modern/src/common/components/StatusCard.jsx
+++ b/modern/src/common/components/StatusCard.jsx
@@ -34,6 +34,7 @@ import usePositionAttributes from '../attributes/usePositionAttributes';
import { devicesActions } from '../../store';
import { useCatch, useCatchCallback } from '../../reactHelper';
import { useAttributePreference } from '../util/preferences';
+import { snackBarDurationShortMs } from '../util/duration';
const useStyles = makeStyles((theme) => ({
card: {
@@ -297,7 +298,12 @@ const StatusCard = ({ deviceId, position, onClose, disableActions, desktopPaddin
itemId={deviceId}
onResult={(removed) => handleRemove(removed)}
/>
- <Snackbar open={shared} onClose={() => setShared(false)} message={t('sharedLinkCopied')} />
+ <Snackbar
+ open={shared}
+ onClose={() => setShared(false)}
+ autoHideDuration={snackBarDurationShortMs}
+ message={t('sharedLinkCopied')}
+ />
</>
);
};