@@ -9,19 +9,20 @@ import './HeaderWithProgress.scss'
99
1010const numberWithCommas = ( n ) => n . toString ( ) . replace ( / \B (? = ( \d { 3 } ) + (? ! \d ) ) / g, ',' )
1111
12- function HeaderWithProgress ( { project, template, currentWizardStep} ) {
12+ function HeaderWithProgress ( { project, template, currentWizardStep, hidePrice } ) {
1313 const flatProject = flatten ( removeValuesOfHiddenNodes ( template , project ) , { safe : true } )
1414 const { priceEstimate } = getProductEstimate ( { scope : template } , flatProject )
1515 const progress = currentWizardStep ? getWizardProgress ( template , currentWizardStep ) : 0
1616
1717 const currentStep = template . sections [ ( currentWizardStep || { } ) . sectionIndex || 0 ]
18-
1918 return (
2019 < div styleName = "HeaderWithProgress" >
2120 < div styleName = "content" >
2221 < div styleName = "title-estimate" >
2322 < h3 > { currentStep . title } </ h3 >
24- < div > From ${ numberWithCommas ( priceEstimate ) } </ div >
23+ { ! hidePrice ?
24+ < div > From ${ numberWithCommas ( priceEstimate ) } </ div > : ''
25+ }
2526 </ div >
2627 < div styleName = "progress-bar" >
2728 < div styleName = "progress" style = { { width : ( progress * 100 ) + '%' } } />
@@ -35,6 +36,7 @@ HeaderWithProgress.propTypes = {
3536 project : PT . object . isRequired ,
3637 template : PT . object . isRequired ,
3738 currentWizardStep : PT . object ,
39+ hidePrice : PT . bool ,
3840}
3941
4042export default HeaderWithProgress
0 commit comments