pop-up notifications
This commit is contained in:
@ -6,6 +6,8 @@ import { getPartnerRequestInfo } from "@redux/outstaffingSlice";
|
||||
|
||||
import { apiRequest } from "@api/request";
|
||||
|
||||
import { useNotification } from "@hooks/useNotification";
|
||||
|
||||
import { Footer } from "@components/Common/Footer/Footer";
|
||||
import { Navigation } from "@components/Navigation/Navigation";
|
||||
import { ProfileBreadcrumbs } from "@components/ProfileBreadcrumbs/ProfileBreadcrumbs";
|
||||
@ -47,6 +49,7 @@ export const PartnerAddRequest = () => {
|
||||
"Выберите кол-во сотрудников"
|
||||
);
|
||||
const [inputs, setInputs] = useState({ title: "", description: "" });
|
||||
const { showNotification } = useNotification();
|
||||
|
||||
if (
|
||||
currentUrl[0] === "/profile/requests-edit" &&
|
||||
@ -120,6 +123,11 @@ export const PartnerAddRequest = () => {
|
||||
}
|
||||
}).then(() => {
|
||||
navigate("/profile/requests");
|
||||
showNotification({
|
||||
show: true,
|
||||
text: "Вакансия успешно изменена",
|
||||
type: "success"
|
||||
});
|
||||
});
|
||||
} else {
|
||||
apiRequest("/request/create-request", {
|
||||
@ -138,6 +146,11 @@ export const PartnerAddRequest = () => {
|
||||
}
|
||||
}).then(() => {
|
||||
navigate("/profile/requests");
|
||||
showNotification({
|
||||
show: true,
|
||||
text: "Вакансия успешно создана",
|
||||
type: "success"
|
||||
});
|
||||
});
|
||||
}
|
||||
};
|
||||
|
Reference in New Issue
Block a user