@@ -14,7 +14,6 @@ import { renderComponent, branch, compose, withProps } from 'recompose'
1414import spinnerWhileLoading from '../../../components/LoadingSpinner'
1515import { createProduct } from '../../actions/project'
1616import { getProductTemplateByKey } from '../../../helpers/templates'
17- import { loadProjectPhasesWithProducts } from '../../actions/project'
1817import { loadProjectDashboard } from '../../../projects/actions/projectDashboard'
1918
2019
@@ -91,26 +90,17 @@ class ProjectAddPhaseContainer extends React.Component {
9190 window . location = returnUrl
9291 } else {
9392 if ( isLoggedIn ) {
94- this . props . history . push ( `/projects/${ project . id } /plan ` )
93+ this . props . history . push ( `/projects/${ project . id } ` )
9594 } else {
9695 this . props . history . push ( '/' )
97- // FIXME ideally we should push on router
98- // window.location = window.location.origin
9996 }
10097 }
10198 }
10299
103100 componentWillReceiveProps ( props ) {
104101 const project = _ . get ( props , 'project' , null )
105102 if ( ! props . processing && ! props . error && project && this . state . isChosenProduct ) {
106- if ( this . state . shouldReloadPhases ) {
107- // reload the project
108- props . loadProjectPhasesWithProducts ( project . id )
109- this . setState ( { shouldReloadPhases : false } )
110- } else if ( ! props . isLoadingPhases ) {
111- // back to plan
112- this . closeWizard ( )
113- }
103+ this . closeWizard ( )
114104 }
115105 }
116106
@@ -165,6 +155,6 @@ const mapStateToProps = ({projectState, loadUser, templates, productsTimelines }
165155 productCategories : templates . productCategories ,
166156} )
167157
168- const actionCreators = { createProduct, loadProjectPhasesWithProducts , loadProjectDashboard}
158+ const actionCreators = { createProduct, loadProjectDashboard}
169159
170160export default withRouter ( connect ( mapStateToProps , actionCreators ) ( ProjectAddPhaseContainer ) )
0 commit comments