fixe notification
This commit is contained in:
@@ -40,7 +40,7 @@ const RoadSafetyFormContext = ({ rowId, mutate, setOpenRoadSafetyForm }) => {
|
||||
const defaultValues = {
|
||||
description: "",
|
||||
};
|
||||
const requestServer = useRequest({ notification: { success: true, show: true } });
|
||||
const requestServer = useRequest({ notificationSuccess: true });
|
||||
const { message, loadingMessage, errorMessage } = usePrevStateOpinion();
|
||||
const {
|
||||
register,
|
||||
@@ -57,7 +57,7 @@ const RoadSafetyFormContext = ({ rowId, mutate, setOpenRoadSafetyForm }) => {
|
||||
setOpenRoadSafetyForm(false);
|
||||
mutate();
|
||||
})
|
||||
.catch(() => {});
|
||||
.catch(() => { });
|
||||
};
|
||||
return (
|
||||
<StyledForm onSubmit={handleSubmit(onSubmit)}>
|
||||
|
||||
@@ -31,7 +31,7 @@ const ReferFormContext = ({ setOpenReferDialog, rowId, mutate }) => {
|
||||
city: "",
|
||||
};
|
||||
const { cities, loadingCities, errorCities } = useCities();
|
||||
const requestServer = useRequest({ notification: { show: true, success: true } });
|
||||
const requestServer = useRequest({ notificationSuccess: true });
|
||||
const {
|
||||
control,
|
||||
register,
|
||||
@@ -50,7 +50,7 @@ const ReferFormContext = ({ setOpenReferDialog, rowId, mutate }) => {
|
||||
setOpenReferDialog(false);
|
||||
mutate();
|
||||
})
|
||||
.catch(() => {});
|
||||
.catch(() => { });
|
||||
};
|
||||
return (
|
||||
<StyledForm onSubmit={handleSubmit(onSubmit)}>
|
||||
|
||||
@@ -40,7 +40,7 @@ const RoadSafetyFormContext = ({ rowId, mutate, setOpenRoadSafetyForm }) => {
|
||||
const defaultValues = {
|
||||
description: "",
|
||||
};
|
||||
const requestServer = useRequest({ notification: { success: true, show: true } });
|
||||
const requestServer = useRequest({ notificationSuccess: true });
|
||||
const { message, loadingMessage, errorMessage } = usePrevStateOpinion();
|
||||
const {
|
||||
register,
|
||||
@@ -57,7 +57,7 @@ const RoadSafetyFormContext = ({ rowId, mutate, setOpenRoadSafetyForm }) => {
|
||||
setOpenRoadSafetyForm(false);
|
||||
mutate();
|
||||
})
|
||||
.catch(() => {});
|
||||
.catch(() => { });
|
||||
};
|
||||
return (
|
||||
<StyledForm onSubmit={handleSubmit(onSubmit)}>
|
||||
|
||||
@@ -31,7 +31,7 @@ const ReferFormContext = ({ setOpenReferDialog, rowId, mutate }) => {
|
||||
province: "",
|
||||
};
|
||||
const { provinces, loadingProvinces, errorProvinces } = useProvinces();
|
||||
const requestServer = useRequest({ notification: { show: true, success: true } });
|
||||
const requestServer = useRequest({ notificationSuccess: true });
|
||||
const {
|
||||
control,
|
||||
register,
|
||||
|
||||
@@ -41,7 +41,7 @@ const RoadSafetyFormContext = ({ rowId, mutate, setOpenRoadSafetyForm }) => {
|
||||
description: "",
|
||||
RadioGroup: "",
|
||||
};
|
||||
const requestServer = useRequest({ notification: { success: true, show: true } });
|
||||
const requestServer = useRequest({ notificationSuccess: true });
|
||||
const {
|
||||
register,
|
||||
handleSubmit,
|
||||
|
||||
Reference in New Issue
Block a user