pop-up notifications

This commit is contained in:
2024-03-12 16:14:44 +03:00
parent 8797ba0778
commit 727d55798a
12 changed files with 186 additions and 40 deletions

View File

@ -12,6 +12,8 @@ import {
import { apiRequest } from "@api/request";
import { useNotification } from "@hooks/useNotification";
import { Footer } from "@components/Common/Footer/Footer";
import { Loader } from "@components/Common/Loader/Loader";
import { Navigation } from "@components/Navigation/Navigation";
@ -38,6 +40,7 @@ export const ViewReport = () => {
const [loader, setLoader] = useState(false);
const [deleteLoader, setDeleteLoader] = useState(false);
const [reportInfo, setReportInfo] = useState({});
const { showNotification } = useNotification();
function getReportFromDate(day) {
setLoader(true);
@ -84,6 +87,11 @@ export const ViewReport = () => {
if (res) {
window.location.replace("/profile/calendar");
}
showNotification({
show: true,
text: "Отчет удален",
type: "success"
});
});
}