From ab7ecfc012a6836bcf82dab6bf1c375aaa74a248 Mon Sep 17 00:00:00 2001 From: Cassie Tarakajian Date: Mon, 22 Jul 2019 17:22:36 -0400 Subject: [PATCH] fix lingering errors from rebase --- 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);