mirror of
https://github.com/hexastack/hexabot
synced 2025-02-23 12:59:14 +00:00
fix(frontend): update inviteUser form
This commit is contained in:
parent
6efc305244
commit
b869e82301
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user