diff --git a/src/BuildingHeatingSystem.js b/src/BuildingHeatingSystem.js index ef399925deca8a64a284c07ca6f2ec70008e13b4..cef2abd2325a67186fdec8de53e13dd192a1cd22 100644 --- a/src/BuildingHeatingSystem.js +++ b/src/BuildingHeatingSystem.js @@ -65,9 +65,8 @@ export default class BuildingHeatingSystem extends React.Component { } render() { - let miniSplitforCooling = '' - miniSplitforCooling = (this.props.surveyId === 1 && this.state.answer === 100)? -
+ const miniSplitforCooling = this.props.surveyId === 1 && this.state.answer === 100 ? +
-
: - '' +
: ''; + const content = (
@@ -87,30 +88,39 @@ export default class BuildingHeatingSystem extends React.Component { { - this.props.answerIds.map((answerId, id) => { - return ( -
- - - - - -
+ this.props.answerIds.map((answerId, id) => { + const surveyOption = ( +
+ + + + + +
); - }) + + return this.props.surveyId === 1 && answerId === 100 ? ( +
+ { surveyOption } + { miniSplitforCooling } +
+ ) : + ( +
+ {surveyOption} +
+ ); + }) } - - { miniSplitforCooling } -