Create Task popup will open at all the time while submitting.
This commit is contained in:
parent
1a3890e837
commit
1fb8eb9ef1
@ -112,7 +112,7 @@ const TaskModel = ({ project, onSubmit, onClose }) => {
|
|||||||
const { mutate: CreateTask, isPending } = useManageTask({
|
const { mutate: CreateTask, isPending } = useManageTask({
|
||||||
onSuccessCallback: (response) => {
|
onSuccessCallback: (response) => {
|
||||||
showToast(response?.message, "success");
|
showToast(response?.message, "success");
|
||||||
onClose?.();
|
// onClose?.();
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
@ -356,9 +356,10 @@ const TaskModel = ({ project, onSubmit, onClose }) => {
|
|||||||
<button
|
<button
|
||||||
type="submit"
|
type="submit"
|
||||||
className="btn btn-sm btn-primary"
|
className="btn btn-sm btn-primary"
|
||||||
disabled={isSubmitting}
|
// disabled={isSubmitting}
|
||||||
|
disabled={isPending}
|
||||||
>
|
>
|
||||||
{isSubmitting ? "Please Wait..." : "Add Task"}
|
{isPending ? "Please Wait..." : "Add Task"}
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user