diff --git a/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/settings/members/InviteSection.tsx b/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/settings/members/InviteSection.tsx index 6205ae94b7c..39bffc0c3b3 100644 --- a/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/settings/members/InviteSection.tsx +++ b/apps/dashboard/src/app/(app)/team/[team_slug]/(team)/~/settings/members/InviteSection.tsx @@ -24,7 +24,6 @@ import { zodResolver } from "@hookform/resolvers/zod"; import { useMutation } from "@tanstack/react-query"; import { ExternalLinkIcon, PlusIcon, Trash2Icon, UserPlus } from "lucide-react"; import Link from "next/link"; -import { useEffect } from "react"; import { useForm } from "react-hook-form"; import { toast } from "sonner"; import { z } from "zod"; @@ -216,19 +215,17 @@ export function InviteSection(props: { }); } - // eslint-disable-next-line no-restricted-syntax - useEffect(() => { - // when form updates - reset mutation result - const subscription = form.watch(() => { - sendInvites.reset(); - }); - - return () => subscription.unsubscribe(); - }, [form.watch, sendInvites.reset]); - return (