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({ 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>