ChangeUsername instead of setUsername

This commit is contained in:
okbel
2018-04-30 20:20:58 -03:00
parent 5dbf379bde
commit 4cd7ad9c33
2 changed files with 5 additions and 5 deletions
@@ -51,10 +51,10 @@ class ChangeUsername extends React.Component {
saveChanges = async () => {
const { newUsername } = this.state.formData;
const { setUsername } = this.props;
const { changeUsername } = this.props;
try {
await setUsername(newUsername);
await changeUsername(newUsername);
this.props.notify(
'success',
t('talk-plugin-auth.change_username.changed_username_success_msg')
@@ -179,7 +179,7 @@ class ChangeUsername extends React.Component {
ChangeUsername.propTypes = {
root: PropTypes.object.isRequired,
setUsername: PropTypes.func.isRequired,
changeUsername: PropTypes.func.isRequired,
notify: PropTypes.func.isRequired,
username: PropTypes.string,
emailAddress: PropTypes.string,