performing mutation

This commit is contained in:
okbel
2018-04-26 18:09:27 -03:00
parent 0a0bbbb3ce
commit a7e09352ef
5 changed files with 29 additions and 4 deletions
@@ -21,7 +21,7 @@ class ChangeUsernameDialog extends React.Component {
if (this.formHasError()) {
this.showError();
} else {
// await this.props.saveChanges
await this.props.saveChanges();
this.props.closeDialog();
}
};
@@ -62,7 +62,7 @@ class ChangeUsernameDialog extends React.Component {
name="confirmNewUsername"
type="text"
onChange={this.props.onChange}
value={this.props.formData.confirmNewUsername}
defaultValue=""
hasError={this.formHasError() && this.state.showError}
errorMsg={t(
'talk-plugin-auth.change_username.username_does_not_match'
@@ -95,6 +95,7 @@ class ChangeUsernameDialog extends React.Component {
}
ChangeUsernameDialog.propTypes = {
saveChanges: PropTypes.func,
closeDialog: PropTypes.func,
showDialog: PropTypes.bool,
onChange: PropTypes.func,