Create Task popup will open at all the time while submitting.

This commit is contained in:
Kartik Sharma 2025-09-26 16:21:37 +05:30
parent 1a3890e837
commit 1fb8eb9ef1

View File

@ -112,7 +112,7 @@ const TaskModel = ({ project, onSubmit, onClose }) => {
const { mutate: CreateTask, isPending } = useManageTask({
onSuccessCallback: (response) => {
showToast(response?.message, "success");
onClose?.();
// onClose?.();
},
});
useEffect(() => {
@ -356,9 +356,10 @@ const TaskModel = ({ project, onSubmit, onClose }) => {
<button
type="submit"
className="btn btn-sm btn-primary"
disabled={isSubmitting}
// disabled={isSubmitting}
disabled={isPending}
>
{isSubmitting ? "Please Wait..." : "Add Task"}
{isPending ? "Please Wait..." : "Add Task"}
</button>
</div>
</form>