Bug fixing

This commit is contained in:
John Lyon-Smith
2018-04-23 14:01:52 -07:00
parent 5cb13f7498
commit 9730c83c9c
26 changed files with 121 additions and 147 deletions

View File

@@ -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({