diff --git a/src/pages/Admin/Charity/Members/AddForm.tsx b/src/pages/Admin/Charity/Members/AddForm.tsx index 71c34d4891..68c5c3bc49 100644 --- a/src/pages/Admin/Charity/Members/AddForm.tsx +++ b/src/pages/Admin/Charity/Members/AddForm.tsx @@ -20,7 +20,7 @@ export type Props = { }; export default function AddForm({ added, endowID }: Props) { - const [addAdmin, { isLoading }] = useNewEndowAdminMutation(); + const [addAdmin] = useNewEndowAdminMutation(); const [profile] = useLazyProfileQuery(); const { setModalOption, showModal } = useModalContext(); const methods = useForm({ @@ -36,7 +36,10 @@ export default function AddForm({ added, endowID }: Props) { }); type FV = typeof methods extends UseFormReturn ? U : never; - const { handleSubmit } = methods; + const { + handleSubmit, + formState: { isSubmitting }, + } = methods; const submit: SubmitHandler = async (fv) => { try { @@ -83,7 +86,7 @@ export default function AddForm({ added, endowID }: Props) { name="firstName" label="First name" required /> name="lastName" label="Last name" required /> -