[user profile] handle errors in saving user profile edits

This commit is contained in:
Fosco Marotto
2020-11-21 13:11:53 -08:00
parent b81b6ad1c2
commit 6a040c2a96
3 changed files with 6 additions and 4 deletions

View File

@@ -98,8 +98,8 @@ class EditProfileModal extends ImmutablePureComponent {
if (account.get('avatar_static') !== avatarSrc) obj.avatar = avatarSrc
if (account.get('header_static') !== headerSrc) obj.header = headerSrc
this.props.onSave(obj)
this.handleOnClose()
this.props.onSave(obj, this.handleOnClose)
//this.handleOnClose()
}
render() {
@@ -210,7 +210,7 @@ const mapStateToProps = (state) => ({
})
const mapDispatchToProps = (dispatch) => ({
onSave: (data) => dispatch(saveUserProfileInformation(data)),
onSave: (data, closer) => dispatch(saveUserProfileInformation(data, closer)),
})
EditProfileModal.propTypes = {