Add user settings modal

This commit is contained in:
Maksim Eltyshev
2020-04-08 21:12:58 +05:00
parent ce1e1f741d
commit c4acb3eb24
29 changed files with 570 additions and 455 deletions
+2 -16
View File
@@ -3,17 +3,10 @@ import { connect } from 'react-redux';
import { currentUserSelector, notificationsForCurrentUserSelector } from '../selectors';
import {
clearCurrentUserEmailUpdateError,
clearCurrentUserPasswordUpdateError,
clearCurrentUserUsernameUpdateError,
deleteNotification,
logout,
openUserSettingsModal,
openUsersModal,
updateCurrentUser,
updateCurrentUserEmail,
updateCurrentUserPassword,
updateCurrentUserUsername,
uploadCurrentUserAvatar,
} from '../actions/entry';
import Header from '../components/Header';
@@ -33,14 +26,7 @@ const mapDispatchToProps = (dispatch) =>
{
onUsers: openUsersModal, // TODO: rename
onNotificationDelete: deleteNotification,
onUserUpdate: updateCurrentUser,
onUserAvatarUpload: uploadCurrentUserAvatar,
onUserUsernameUpdate: updateCurrentUserUsername,
onUserUsernameUpdateMessageDismiss: clearCurrentUserUsernameUpdateError,
onUserEmailUpdate: updateCurrentUserEmail,
onUserEmailUpdateMessageDismiss: clearCurrentUserEmailUpdateError,
onUserPasswordUpdate: updateCurrentUserPassword,
onUserPasswordUpdateMessageDismiss: clearCurrentUserPasswordUpdateError,
onUserSettings: openUserSettingsModal,
onLogout: logout,
},
dispatch,