X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/b7a4d46fe2b011cdb6e38ed42e9f886fee8290b8..e8e0182d65a74b1a222127eb8b36f31a906b14c8:/src/views/my-account-panel/my-account-panel.tsx

diff --git a/src/views/my-account-panel/my-account-panel.tsx b/src/views/my-account-panel/my-account-panel.tsx
index adc2f694..03caa887 100644
--- a/src/views/my-account-panel/my-account-panel.tsx
+++ b/src/views/my-account-panel/my-account-panel.tsx
@@ -3,23 +3,23 @@
 // SPDX-License-Identifier: AGPL-3.0
 
 import { RootState } from '~/store/store';
-import { Dispatch, compose } from 'redux';
-import { reduxForm, reset } from 'redux-form';
+import { compose } from 'redux';
+import { reduxForm, isPristine, isValid } from 'redux-form';
 import { connect } from 'react-redux';
-import { MyAccountPanelRoot, MyAccountPanelRootDataProps, MyAccountPanelRootActionProps, MY_ACCOUNT_FORM } from '~/views/my-account-panel/my-account-panel-root';
+import { saveEditedUser } from '~/store/my-account/my-account-panel-actions';
+import { MyAccountPanelRoot, MyAccountPanelRootDataProps, MY_ACCOUNT_FORM } from '~/views/my-account-panel/my-account-panel-root';
 
 const mapStateToProps = (state: RootState): MyAccountPanelRootDataProps => ({
-    user: state.auth.user
+    isPristine: isPristine(MY_ACCOUNT_FORM)(state),
+    isValid: isValid(MY_ACCOUNT_FORM)(state),
+    initialValues: state.auth.user
 });
 
-const mapDispatchToProps = (dispatch: Dispatch): MyAccountPanelRootActionProps => ({
-
-});
-
-export const MyAccountPanel = compose(connect(mapStateToProps, mapDispatchToProps), reduxForm({
+export const MyAccountPanel = compose(
+    connect(mapStateToProps),
+    reduxForm({
     form: MY_ACCOUNT_FORM,
     onSubmit: (data, dispatch) => {
-        // dispatch(moveProject(data));
-
+        dispatch(saveEditedUser(data));
     }
 }))(MyAccountPanelRoot);
\ No newline at end of file
