Fix for SignupEmail invite handling (#6820)
* Fix SignupEmail invite handling * Fix eslint errors
Этот коммит содержится в:
коммит произвёл
Joram Wilander
родитель
39b071bc0e
Коммит
e6ca2974cd
@@ -52,9 +52,9 @@ export default class SignupEmail extends React.Component {
|
|||||||
let teamDisplayName = '';
|
let teamDisplayName = '';
|
||||||
let teamName = '';
|
let teamName = '';
|
||||||
let teamId = '';
|
let teamId = '';
|
||||||
let loading = true;
|
let loading = false;
|
||||||
let serverError = '';
|
const serverError = '';
|
||||||
let noOpenServerError = false;
|
const noOpenServerError = false;
|
||||||
|
|
||||||
if (hash && hash.length > 0) {
|
if (hash && hash.length > 0) {
|
||||||
const parsedData = JSON.parse(data);
|
const parsedData = JSON.parse(data);
|
||||||
@@ -62,37 +62,40 @@ export default class SignupEmail extends React.Component {
|
|||||||
teamDisplayName = parsedData.display_name;
|
teamDisplayName = parsedData.display_name;
|
||||||
teamName = parsedData.name;
|
teamName = parsedData.name;
|
||||||
teamId = parsedData.id;
|
teamId = parsedData.id;
|
||||||
loading = false;
|
|
||||||
} else if (inviteId && inviteId.length > 0) {
|
} else if (inviteId && inviteId.length > 0) {
|
||||||
loading = true;
|
loading = true;
|
||||||
getInviteInfo(
|
getInviteInfo(
|
||||||
inviteId,
|
inviteId,
|
||||||
(inviteData) => {
|
(inviteData) => {
|
||||||
if (!inviteData) {
|
if (!inviteData) {
|
||||||
|
this.setState({loading: false});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
serverError = '';
|
this.setState({
|
||||||
teamDisplayName = inviteData.display_name;
|
loading: false,
|
||||||
teamName = inviteData.name;
|
serverError: '',
|
||||||
teamId = inviteData.id;
|
teamDisplayName: inviteData.display_name,
|
||||||
|
teamName: inviteData.name,
|
||||||
|
teamId: inviteData.id
|
||||||
|
});
|
||||||
},
|
},
|
||||||
() => {
|
() => {
|
||||||
noOpenServerError = true;
|
this.setState({
|
||||||
serverError = (
|
loading: false,
|
||||||
<FormattedMessage
|
noOpenServerError: true,
|
||||||
id='signup_user_completed.invalid_invite'
|
serverError: (
|
||||||
defaultMessage='The invite link was invalid. Please speak with your Administrator to receive an invitation.'
|
<FormattedMessage
|
||||||
/>
|
id='signup_user_completed.invalid_invite'
|
||||||
);
|
defaultMessage='The invite link was invalid. Please speak with your Administrator to receive an invitation.'
|
||||||
|
/>
|
||||||
|
)
|
||||||
|
});
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
loading = false;
|
|
||||||
data = null;
|
data = null;
|
||||||
hash = null;
|
hash = null;
|
||||||
} else {
|
|
||||||
loading = false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user