ui: fix toast auto close

This commit is contained in:
nick-delirium 2025-03-28 17:26:22 +01:00
parent c6a5ed6c3b
commit 7dec8bb943
No known key found for this signature in database
GPG key ID: 93ABD695DF5FDBA0
4 changed files with 12 additions and 14 deletions

View file

@ -66,7 +66,8 @@ function Login({
if (event.data.type === 'orspot:logged') {
clearInterval(int);
window.removeEventListener('message', onSpotMsg);
toast.success(t('You have been logged into Spot successfully'));
const msg = t('You have been logged into Spot successfully')
toast.success(msg);
}
};
window.addEventListener('message', onSpotMsg);

View file

@ -5,17 +5,14 @@ import styles from './notification.module.css';
export default function ({
transition = Flip,
position = 'bottom-right',
autoClose = 3000,
...props
}) {
return (
<ToastContainer
hideProgressBar
position={position}
draggable
pauseOnHover
transition={transition}
autoClose={autoClose}
autoClose={3000}
className={styles.container}
toastClassName={styles.toast}
closeButton={false}

View file

@ -79,7 +79,7 @@
"react-router-dom": "^5.3.3",
"react-select": "^5.3.2",
"react-svg-map": "^2.2.0",
"react-toastify": "^10.0.6",
"react-toastify": "^11.0.5",
"react18-json-view": "^0.2.8",
"recharts": "^2.12.7",
"socket.io-client": "^4.4.1",

View file

@ -12042,7 +12042,7 @@ __metadata:
react-router-dom: "npm:^5.3.3"
react-select: "npm:^5.3.2"
react-svg-map: "npm:^2.2.0"
react-toastify: "npm:^10.0.6"
react-toastify: "npm:^11.0.5"
react18-json-view: "npm:^0.2.8"
recharts: "npm:^2.12.7"
sass: "npm:^1.51.0"
@ -14169,15 +14169,15 @@ __metadata:
languageName: node
linkType: hard
"react-toastify@npm:^10.0.6":
version: 10.0.6
resolution: "react-toastify@npm:10.0.6"
"react-toastify@npm:^11.0.5":
version: 11.0.5
resolution: "react-toastify@npm:11.0.5"
dependencies:
clsx: "npm:^2.1.0"
clsx: "npm:^2.1.1"
peerDependencies:
react: ">=18"
react-dom: ">=18"
checksum: 10c1/6f34ed20677e77eeaddc7c55ce0b170b12735034f25c4917adfb9d1921b87fcae59b685b4479040c0d42244d771250475534e59040fe9c0c61c7437b12973186
react: ^18 || ^19
react-dom: ^18 || ^19
checksum: 10c1/608c0a24fdbfcabe19f33570b9469921857ba24efb929083ab46c321b99cefeb4c76f53a788bb8796ff49bb729d7ab8d22a0ef17c1ea6f70e47ee74ec89aadf1
languageName: node
linkType: hard