diff --git a/frontend/src/components/new-project/index.js b/frontend/src/components/new-project/index.js index 7228b249..19a5a3d2 100644 --- a/frontend/src/components/new-project/index.js +++ b/frontend/src/components/new-project/index.js @@ -10,8 +10,7 @@ const Input = require('@ui/components/input'); const Button = require('@ui/components/button'); const { - Field, - reduxForm + Field } = ReduxForm; const { @@ -115,8 +114,4 @@ CreateProject.propTypes = { submitting: React.PropTypes.bool.isRequired }; -module.exports = reduxForm({ - form: 'create-project', - destroyOnUnmount: false, - forceUnregisterOnUnmount: true -})(CreateProject); +module.exports = CreateProject; diff --git a/frontend/src/components/new-project/new-billing.js b/frontend/src/components/new-project/new-billing.js index 5958ba06..2b37359a 100644 --- a/frontend/src/components/new-project/new-billing.js +++ b/frontend/src/components/new-project/new-billing.js @@ -10,8 +10,7 @@ const Input = require('@ui/components/input'); const Button = require('@ui/components/button'); const { - Field, - reduxForm + Field } = ReduxForm; const { @@ -146,9 +145,4 @@ CreateBilling.propTypes = { submitting: React.PropTypes.bool.isRequired }; -module.exports = reduxForm({ - form: 'create-project', - /*destroyOnUnmount: false, - forceUnregisterOnUnmount: true/*, - validate*/ -})(CreateBilling); +module.exports = CreateBilling; diff --git a/frontend/src/containers/new-project/billing.js b/frontend/src/containers/new-project/billing.js index 59268f6c..630edc42 100644 --- a/frontend/src/containers/new-project/billing.js +++ b/frontend/src/containers/new-project/billing.js @@ -23,7 +23,7 @@ const { handleNewProject } = actions; -const BillingForm = reduxForm({ +const NewProjectBillingForm = reduxForm({ form: 'create-project', destroyOnUnmount: false, forceUnregisterOnUnmount: true @@ -52,7 +52,7 @@ const Billing = (props) => { router.push(`/${org.id}/new-project/new-billing`); return ( - { const { diff --git a/frontend/src/containers/new-project/new-project.js b/frontend/src/containers/new-project/new-project.js index 89574e90..ebf86b38 100644 --- a/frontend/src/containers/new-project/new-project.js +++ b/frontend/src/containers/new-project/new-project.js @@ -1,18 +1,30 @@ const React = require('react'); const ReactRedux = require('react-redux'); +const ReduxForm = require('redux-form'); +const selectors = require('@state/selectors'); const selectors = require('@state/selectors'); const PropTypes = require('@root/prop-types'); -const NewProjectForm = require('@components/new-project'); +const CreateProject = require('@components/new-project'); const { connect } = ReactRedux; +const { + reduxForm +} = ReduxForm; + const { orgByIdSelector } = selectors; +const NewProjectForm = reduxForm({ + form: 'create-project', + destroyOnUnmount: false, + forceUnregisterOnUnmount: true +})(CreateProject); + const NewProject = (props) => { const {