@@ -14,9 +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'
18- import { loadProjectDashboard } from '../../../projects/actions/projectDashboard'
19-
2017
2118import CoderBot from '../../../components/CoderBot/CoderBot'
2219import Wizard from '../../../components/Wizard'
@@ -91,26 +88,17 @@ class ProjectAddPhaseContainer extends React.Component {
9188 window . location = returnUrl
9289 } else {
9390 if ( isLoggedIn ) {
94- this . props . history . push ( `/projects/${ project . id } /plan ` )
91+ this . props . history . push ( `/projects/${ project . id } ` )
9592 } else {
9693 this . props . history . push ( '/' )
97- // FIXME ideally we should push on router
98- // window.location = window.location.origin
9994 }
10095 }
10196 }
10297
10398 componentWillReceiveProps ( props ) {
10499 const project = _ . get ( props , 'project' , null )
105100 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- }
101+ this . closeWizard ( )
114102 }
115103 }
116104
@@ -165,6 +153,6 @@ const mapStateToProps = ({projectState, loadUser, templates, productsTimelines }
165153 productCategories : templates . productCategories ,
166154} )
167155
168- const actionCreators = { createProduct, loadProjectPhasesWithProducts , loadProjectDashboard }
156+ const actionCreators = { createProduct}
169157
170158export default withRouter ( connect ( mapStateToProps , actionCreators ) ( ProjectAddPhaseContainer ) )
0 commit comments