mirror of
https://github.com/yldio/copilot.git
synced 2024-11-28 14:10:04 +02:00
Move form creation to containers for new project
This commit is contained in:
parent
e3b304846d
commit
eb3701e784
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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 (
|
||||
<BillingForm
|
||||
<NewProjectBillingForm
|
||||
cards={cards}
|
||||
onNewBilling={onNewBilling}
|
||||
onSubmit={onSubmit}
|
||||
|
@ -1,15 +1,20 @@
|
||||
const React = require('react');
|
||||
const ReactRedux = require('react-redux');
|
||||
const ReduxForm = require('redux-form');
|
||||
const selectors = require('@state/selectors');
|
||||
const actions = require('@state/actions');
|
||||
|
||||
const PropTypes = require('@root/prop-types');
|
||||
const NewBillingForm = require('@components/new-project/new-billing');
|
||||
const CreateBilling = require('@components/new-project/new-billing');
|
||||
|
||||
const {
|
||||
connect
|
||||
} = ReactRedux;
|
||||
|
||||
const {
|
||||
reduxForm
|
||||
} = ReduxForm;
|
||||
|
||||
const {
|
||||
orgByIdSelector
|
||||
} = selectors;
|
||||
@ -18,6 +23,10 @@ const {
|
||||
handleNewProject
|
||||
} = actions;
|
||||
|
||||
const NewBillingForm = reduxForm({
|
||||
form: 'create-project'
|
||||
})(CreateBilling);
|
||||
|
||||
const NewBilling = (props) => {
|
||||
|
||||
const {
|
||||
|
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user