Add email and password change functionality for a current user, remove deep compare hooks

This commit is contained in:
Maksim Eltyshev
2019-10-18 08:06:34 +05:00
parent e564729598
commit 2566ff376e
67 changed files with 1232 additions and 267 deletions

View File

@@ -3,10 +3,14 @@ import { connect } from 'react-redux';
import { currentUserSelector, notificationsForCurrentUserSelector } from '../selectors';
import {
clearCurrentUserEmailUpdateError,
clearCurrentUserPasswordUpdateError,
deleteNotification,
logout,
openUsersModal,
updateCurrentUser,
updateCurrentUserEmail,
updateCurrentUserPassword,
uploadCurrentUserAvatar,
} from '../actions/entry';
import Header from '../components/Header';
@@ -24,10 +28,14 @@ const mapStateToProps = (state) => {
const mapDispatchToProps = (dispatch) => bindActionCreators(
{
onUsers: openUsersModal, // TODO: rename
onNotificationDelete: deleteNotification,
onUserUpdate: updateCurrentUser,
onUserAvatarUpload: uploadCurrentUserAvatar,
onNotificationDelete: deleteNotification,
onUsers: openUsersModal, // TODO: rename
onUserEmailUpdate: updateCurrentUserEmail,
onUserEmailUpdateMessageDismiss: clearCurrentUserEmailUpdateError,
onUserPasswordUpdate: updateCurrentUserPassword,
onUserPasswordUpdateMessageDismiss: clearCurrentUserPasswordUpdateError,
onLogout: logout,
},
dispatch,