build and format2
This commit is contained in:
@@ -31,11 +31,7 @@ const ConfirmRoadSafetyDialog = ({ handleClose, rowId, mutate }) => {
|
||||
{loading ? (
|
||||
<DialogLoading loadingOpen={loading} />
|
||||
) : data ? (
|
||||
<ConfirmRoadSafetyFormContext
|
||||
rowId={rowId}
|
||||
mutate={mutate}
|
||||
handleClose={handleClose}
|
||||
/>
|
||||
<ConfirmRoadSafetyFormContext rowId={rowId} mutate={mutate} handleClose={handleClose} />
|
||||
) : (
|
||||
<DialogContent>
|
||||
<Typography textAlign={"center"}>اطلاعات درخواست در سامانه یافت نشد</Typography>
|
||||
|
||||
@@ -4,7 +4,7 @@ import useRequest from "@/lib/hooks/useRequest";
|
||||
import { useState } from "react";
|
||||
|
||||
const ConfirmRoadSafetyFormContext = ({ rowId, mutate, handleClose }) => {
|
||||
const requestServer = useRequest({notificationShow : true, notificationSuccess : true});
|
||||
const requestServer = useRequest({ notificationShow: true, notificationSuccess: true });
|
||||
const [description, setDescription] = useState("");
|
||||
const [loading, setLoading] = useState(false);
|
||||
const [error, setError] = useState(null);
|
||||
@@ -30,7 +30,7 @@ const ConfirmRoadSafetyFormContext = ({ rowId, mutate, handleClose }) => {
|
||||
setSuccess(true);
|
||||
mutate();
|
||||
setDescription("");
|
||||
handleClose()
|
||||
handleClose();
|
||||
} catch (err) {
|
||||
setError(err.message);
|
||||
} finally {
|
||||
|
||||
Reference in New Issue
Block a user