fix(frontend): update inviteUser form

This commit is contained in:
yassinedorbozgithub 2025-02-07 06:28:33 +01:00
parent 6efc305244
commit b869e82301

View File

@ -30,7 +30,7 @@ export const InviteUserForm: FC<ComponentFormProps<undefined>> = ({
}) => { }) => {
const { t } = useTranslate(); const { t } = useTranslate();
const { toast } = useToast(); const { toast } = useToast();
const { mutateAsync: sendInvitation } = useSendInvitation({ const { mutate: sendInvitation } = useSendInvitation({
onSuccess: () => { onSuccess: () => {
rest.onSuccess?.(); rest.onSuccess?.();
toast.success(t("message.success_invitation_sent")); toast.success(t("message.success_invitation_sent"));
@ -58,9 +58,8 @@ export const InviteUserForm: FC<ComponentFormProps<undefined>> = ({
required: t("message.roles_is_required"), required: t("message.roles_is_required"),
}, },
}; };
const onSubmitForm = async (params: IInvitationAttributes) => { const onSubmitForm = (params: IInvitationAttributes) =>
sendInvitation(params); sendInvitation(params);
};
return ( return (
<Wrapper <Wrapper