modal accept with notifications

This commit is contained in:
nik.polishuk committed 2023-07-14 03:03:33 +03:00
1 parent 242f298bee
commit 001920a840
17 files changed
+310 -25

No files matched your search

+15
View File
@@ -0,0 +1,15 @@
import { useDispatch } from "react-redux";
import { setNotification, closeNotification } from "../redux/outstaffingSlice";
export const useNotification = () => {
const dispatch = useDispatch();
const showNotification = (notification) => {
dispatch(setNotification(notification))
setTimeout(() => {
dispatch(closeNotification())
}, 2500)
}
return { showNotification }
};