diff --git a/src/projects/detail/containers/ProjectAddPhaseContainer.jsx b/src/projects/detail/containers/ProjectAddPhaseContainer.jsx index 64ac578c4..804d3ffc9 100644 --- a/src/projects/detail/containers/ProjectAddPhaseContainer.jsx +++ b/src/projects/detail/containers/ProjectAddPhaseContainer.jsx @@ -14,9 +14,6 @@ import { renderComponent, branch, compose, withProps } from 'recompose' import spinnerWhileLoading from '../../../components/LoadingSpinner' import { createProduct } from '../../actions/project' import { getProductTemplateByKey } from '../../../helpers/templates' -import { loadProjectPhasesWithProducts } from '../../actions/project' -import { loadProjectDashboard } from '../../../projects/actions/projectDashboard' - import CoderBot from '../../../components/CoderBot/CoderBot' import Wizard from '../../../components/Wizard' @@ -91,11 +88,9 @@ class ProjectAddPhaseContainer extends React.Component { window.location = returnUrl } else { if (isLoggedIn) { - this.props.history.push(`/projects/${project.id}/plan`) + this.props.history.push(`/projects/${project.id}`) } else { this.props.history.push('/') - // FIXME ideally we should push on router - // window.location = window.location.origin } } } @@ -103,14 +98,7 @@ class ProjectAddPhaseContainer extends React.Component { componentWillReceiveProps(props) { const project = _.get(props, 'project', null) if (!props.processing && !props.error && project && this.state.isChosenProduct) { - if (this.state.shouldReloadPhases) { - // reload the project - props.loadProjectPhasesWithProducts(project.id) - this.setState({shouldReloadPhases: false}) - } else if (!props.isLoadingPhases) { - // back to plan - this.closeWizard() - } + this.closeWizard() } } @@ -165,6 +153,6 @@ const mapStateToProps = ({projectState, loadUser, templates, productsTimelines } productCategories: templates.productCategories, }) -const actionCreators = {createProduct, loadProjectPhasesWithProducts, loadProjectDashboard} +const actionCreators = {createProduct} export default withRouter(connect(mapStateToProps, actionCreators)(ProjectAddPhaseContainer))