SM
const timeout = useRef(null)
useEffect(() => {
timeout.current = startTimeout()
}, [])
useEffect(() => {
clearTimeout(timeout.current)
timeout.current = startTimeout()
}, [notifications.length])
const startTimeout = () => {
return setTimeout(() => setOpen(false), 3000)
}

