From 443232380c6dacf0340ffcb594740d3e3cbbdbb1 Mon Sep 17 00:00:00 2001 From: Cassie Tarakajian Date: Mon, 22 Jul 2019 17:52:19 -0400 Subject: [PATCH] fix errors from rebase, again --- client/modules/User/pages/AccountView.jsx | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/client/modules/User/pages/AccountView.jsx b/client/modules/User/pages/AccountView.jsx index 35fa127f..7382656e 100644 --- a/client/modules/User/pages/AccountView.jsx +++ b/client/modules/User/pages/AccountView.jsx @@ -1,10 +1,11 @@ import PropTypes from 'prop-types'; import React from 'react'; -import { connect } from 'react-redux'; +import { reduxForm } from 'redux-form'; import { bindActionCreators } from 'redux'; import { browserHistory } from 'react-router'; import { Tab, Tabs, TabList, TabPanel } from 'react-tabs'; import InlineSVG from 'react-inlinesvg'; +import axios from 'axios'; import { Helmet } from 'react-helmet'; import { updateSettings, initiateVerification, createApiKey, removeApiKey } from '../actions'; import AccountForm from '../components/AccountForm'; @@ -113,4 +114,10 @@ AccountView.propTypes = { theme: PropTypes.string.isRequired }; -export default connect(mapStateToProps, mapDispatchToProps)(AdvancedSettingsView); +export default reduxForm({ + form: 'updateAllSettings', + fields: ['username', 'email', 'currentPassword', 'newPassword'], + validate: validateSettings, + asyncValidate, + asyncBlurFields: ['username', 'email', 'currentPassword'] +}, mapStateToProps, mapDispatchToProps)(AccountView);