@@ -2,7 +2,7 @@ import _ from 'lodash'
22import React , { PropTypes as PT , Component } from 'react'
33import Sticky from 'react-stickynode'
44
5- import config from '../../../config/projectWizard'
5+ import { findProduct } from '../../../config/projectWizard'
66import './FillProjectDetails.scss'
77import ProjectBasicDetailsForm from '../components/ProjectBasicDetailsForm'
88import ProjectOutline from '../components/ProjectOutline'
@@ -33,22 +33,20 @@ class FillProjectDetails extends Component {
3333
3434 render ( ) {
3535 const { project, dirtyProject, processing, submitBtnText } = this . props
36- const product = _ . get ( project , 'details.products[0]' )
37- const projectTypeId = _ . get ( project , 'type' )
38- const subConfig = config [ _ . findKey ( config , { id : projectTypeId } ) ]
39- const productName = _ . findKey ( subConfig . subtypes , { id : product } )
36+ const productId = _ . get ( project , 'details.products[0]' )
37+ const product = findProduct ( productId )
4038
4139 let specification = 'topcoder.v1'
42- if ( product )
43- specification = typeToSpecification [ product ]
40+ if ( productId )
41+ specification = typeToSpecification [ productId ]
4442 let sections = require ( `../../../config/projectQuestions/${ specification } ` ) . basicSections
4543 return (
4644 < div className = "FillProjectDetailsWrapper" >
4745 < div className = "header headerFillProjectDetails" >
4846 </ div >
4947 < div className = "FillProjectDetails" >
5048 < div className = "header" >
51- < h1 > Let's setup your { productName } project</ h1 >
49+ < h1 > { _ . get ( product , 'formTitle' , ` Let's setup your ${ product . name } project` ) } </ h1 >
5250 </ div >
5351 < section className = "two-col-content content" >
5452 < div className = "container" >
0 commit comments