Bug fixing
This commit is contained in:
@@ -143,75 +143,6 @@ export class Teams extends Component {
|
||||
})
|
||||
}
|
||||
|
||||
@autobind
|
||||
handleResendEmail() {
|
||||
this.setState({
|
||||
waitModal: { message: "Resending Email..." },
|
||||
})
|
||||
api
|
||||
.sendConfirmEmail({ existingEmail: this.state.selectedTeam.email })
|
||||
.then(() => {
|
||||
this.setState({
|
||||
waitModal: null,
|
||||
messageModal: {
|
||||
icon: "thumb",
|
||||
message: `An email has been sent to '${
|
||||
this.state.selectedTeam.email
|
||||
}' with further instructions.`,
|
||||
},
|
||||
})
|
||||
})
|
||||
.catch((error) => {
|
||||
this.setState({
|
||||
error: true,
|
||||
waitModal: null,
|
||||
messageModal: {
|
||||
icon: "hand",
|
||||
message: "Unable to request email change.",
|
||||
detail: error.message,
|
||||
},
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
@autobind
|
||||
handleChangeEmailDismiss(newEmail) {
|
||||
this.setState({ changeEmailModal: null })
|
||||
if (!newEmail) {
|
||||
return
|
||||
}
|
||||
this.setState({
|
||||
waitModal: { message: "Requesting Email Change..." },
|
||||
})
|
||||
if (this.state.selectedTeam) {
|
||||
api
|
||||
.sendConfirmEmail({
|
||||
existingEmail: this.state.selectedTeam.email,
|
||||
newEmail,
|
||||
})
|
||||
.then(() => {
|
||||
this.setState({
|
||||
waitModal: null,
|
||||
messageModal: {
|
||||
icon: "hand",
|
||||
message: `An email has been sent to '${newEmail}' to confirm this email.`,
|
||||
},
|
||||
})
|
||||
})
|
||||
.catch((error) => {
|
||||
this.setState({
|
||||
error: true,
|
||||
waitModal: null,
|
||||
messageModal: {
|
||||
icon: "hand",
|
||||
message: "Unable to request email change.",
|
||||
detail: error.message,
|
||||
},
|
||||
})
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
@autobind
|
||||
handleRemove() {
|
||||
this.setState({
|
||||
|
||||
Reference in New Issue
Block a user