mirror of
https://github.com/wassname/talk.git
synced 2026-07-20 12:40:47 +08:00
Sync username with store
This commit is contained in:
@@ -30,6 +30,16 @@ class ChangeUsernameContainer extends React.Component {
|
||||
};
|
||||
}
|
||||
|
||||
componentWillReceiveProps(next) {
|
||||
if (!this.props.auth.showCreateUsernameDialog && next.auth.showCreateUsernameDialog) {
|
||||
this.setState({
|
||||
formData: {
|
||||
username: (this.props.auth.user && this.props.auth.user.username) || '',
|
||||
},
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
handleChange = e => {
|
||||
const {name, value} = e.target;
|
||||
this.setState(
|
||||
|
||||
Reference in New Issue
Block a user