From 4cd7ad9c3351fd487c979d7caafa8b3b0a75faaf Mon Sep 17 00:00:00 2001 From: okbel Date: Mon, 30 Apr 2018 20:20:58 -0300 Subject: [PATCH] ChangeUsername instead of setUsername --- .../client/profile-settings/components/ChangeUsername.js | 6 +++--- .../client/profile-settings/containers/ChangeUsername.js | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/plugins/talk-plugin-auth/client/profile-settings/components/ChangeUsername.js b/plugins/talk-plugin-auth/client/profile-settings/components/ChangeUsername.js index c30a43a29..8188bdfbe 100644 --- a/plugins/talk-plugin-auth/client/profile-settings/components/ChangeUsername.js +++ b/plugins/talk-plugin-auth/client/profile-settings/components/ChangeUsername.js @@ -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, diff --git a/plugins/talk-plugin-auth/client/profile-settings/containers/ChangeUsername.js b/plugins/talk-plugin-auth/client/profile-settings/containers/ChangeUsername.js index 5381ef162..87e1e18b5 100644 --- a/plugins/talk-plugin-auth/client/profile-settings/containers/ChangeUsername.js +++ b/plugins/talk-plugin-auth/client/profile-settings/containers/ChangeUsername.js @@ -3,10 +3,10 @@ import { bindActionCreators } from 'redux'; import { connect } from 'plugin-api/beta/client/hocs'; import ChangeUsername from '../components/ChangeUsername'; import { notify } from 'coral-framework/actions/notification'; -import { withSetUsername } from 'plugin-api/beta/client/hocs'; +import { withChangeUsername } from 'plugin-api/beta/client/hocs'; const mapDispatchToProps = dispatch => bindActionCreators({ notify }, dispatch); -export default compose(connect(null, mapDispatchToProps), withSetUsername)( +export default compose(connect(null, mapDispatchToProps), withChangeUsername)( ChangeUsername );