fix: invite user service issues

This commit is contained in:
Ahmed Bouhuolia
2026-02-18 12:32:04 +02:00
parent 06b8a836c5
commit 78032d7bfc
9 changed files with 95 additions and 49 deletions

View File

@@ -58,7 +58,7 @@ export default function InviteAcceptForm() {
data: { errors },
},
}) => {
if (errors.find((e) => e.type === 'INVITE.TOKEN.NOT.FOUND')) {
if (errors.find((e) => e.type === 'INVITE_TOKEN_INVALID')) {
AppToaster.show({
message: intl.get('an_unexpected_error_occurred'),
intent: Intent.DANGER,
@@ -71,14 +71,6 @@ export default function InviteAcceptForm() {
phone_number: 'This phone number is used in another account.',
});
}
if (errors.find((e) => e.type === 'INVITE.TOKEN.NOT.FOUND')) {
AppToaster.show({
message: intl.get('an_unexpected_error_occurred'),
intent: Intent.DANGER,
position: Position.BOTTOM,
});
history.push('/auth/login');
}
setSubmitting(false);
},
);