mirror of
https://github.com/wassname/talk.git
synced 2026-07-18 12:40:13 +08:00
Merge branch 'gdpr-username' of github.com:coralproject/talk into gdpr-email
* 'gdpr-username' of github.com:coralproject/talk: ChangeUsername instead of setUsername
This commit is contained in:
@@ -35,6 +35,10 @@ class ConfirmChangesDialog extends React.Component {
|
||||
};
|
||||
|
||||
render() {
|
||||
const totalSteps = React.Children.count(this.props.children);
|
||||
|
||||
if (!totalSteps) return null;
|
||||
|
||||
return (
|
||||
<Dialog
|
||||
open={this.props.showDialog}
|
||||
|
||||
@@ -121,10 +121,10 @@ class Profile extends React.Component {
|
||||
|
||||
saveUsername = 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')
|
||||
@@ -266,7 +266,7 @@ Profile.propTypes = {
|
||||
updateEmailAddress: PropTypes.func.isRequired,
|
||||
changeUsername: PropTypes.func.isRequired,
|
||||
root: PropTypes.object.isRequired,
|
||||
setUsername: PropTypes.func.isRequired,
|
||||
changeUsername: PropTypes.func.isRequired,
|
||||
notify: PropTypes.func.isRequired,
|
||||
username: PropTypes.string,
|
||||
emailAddress: PropTypes.string,
|
||||
|
||||
Reference in New Issue
Block a user