summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoram Wilander <jwawilander@gmail.com>2016-09-09 09:08:53 -0400
committerenahum <nahumhbl@gmail.com>2016-09-09 10:08:53 -0300
commit95526c89f0d7cf9f47de3a786710eb28f53a9145 (patch)
tree28933e082337a8ecfdec5adc2faabfaa44f22b03
parentc564ea1a1c098d8f612f046c73ae137b6d2421b9 (diff)
downloadchat-95526c89f0d7cf9f47de3a786710eb28f53a9145.tar.gz
chat-95526c89f0d7cf9f47de3a786710eb28f53a9145.tar.bz2
chat-95526c89f0d7cf9f47de3a786710eb28f53a9145.zip
Fix team invite links when the invite ID is invalid (#3998)
-rw-r--r--webapp/components/signup/signup_controller.jsx16
1 files changed, 12 insertions, 4 deletions
diff --git a/webapp/components/signup/signup_controller.jsx b/webapp/components/signup/signup_controller.jsx
index b54dd9c9e..e133c9dfa 100644
--- a/webapp/components/signup/signup_controller.jsx
+++ b/webapp/components/signup/signup_controller.jsx
@@ -79,9 +79,16 @@ export default class SignupController extends React.Component {
}
);
},
- (err) => {
+ () => {
this.setState({ // eslint-disable-line react/no-did-mount-set-state
- serverError: err.message
+ 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.'
+ />
+ )
});
}
);
@@ -281,8 +288,6 @@ export default class SignupController extends React.Component {
);
}
- let signupControls = this.renderSignupControls();
-
let serverError = null;
if (this.state.serverError) {
serverError = (
@@ -292,8 +297,11 @@ export default class SignupController extends React.Component {
);
}
+ let signupControls;
if (this.state.noOpenServerError || this.state.usedBefore) {
signupControls = null;
+ } else {
+ signupControls = this.renderSignupControls();
}
return (