Commit 691039b1 authored by Harrison Healey's avatar Harrison Healey Committed by Corey Hulen

PLT-6751 Fixed error message when trying to join full team (#6657)

parent 07bdd17a
......@@ -83,18 +83,7 @@ export default class SignupController extends React.Component {
}
);
},
() => {
this.setState({ // eslint-disable-line react/no-did-mount-set-state
noOpenServerError: true,
loading: false,
serverError: (
<FormattedMessage
id='signup_user_completed.invalid_invite'
defaultMessage='The invite link was invalid. Please speak with your Administrator to receive an invitation.'
/>
)
});
}
this.handleInvalidInvite
);
return;
......@@ -113,18 +102,7 @@ export default class SignupController extends React.Component {
loading: false
});
},
() => {
this.setState({ // eslint-disable-line react/no-did-mount-set-state
noOpenServerError: true,
loading: false,
serverError: (
<FormattedMessage
id='signup_user_completed.invalid_invite'
defaultMessage='The invite link was invalid. Please speak with your Administrator to receive an invitation.'
/>
)
});
}
this.handleInvalidInvite
);
return;
......@@ -136,6 +114,26 @@ export default class SignupController extends React.Component {
}
}
handleInvalidInvite = (err) => {
let serverError;
if (err.id === 'store.sql_user.save.max_accounts.app_error') {
serverError = err.message;
} else {
serverError = (
<FormattedMessage
id='signup_user_completed.invalid_invite'
defaultMessage='The invite link was invalid. Please speak with your Administrator to receive an invitation.'
/>
);
}
this.setState({
noOpenServerError: true,
loading: false,
serverError
});
}
renderSignupControls() {
let signupControls = [];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment