diff --git a/source/components/GenericSimulation.js b/source/components/GenericSimulation.js index 1bad1cda6..8c26786cf 100644 --- a/source/components/GenericSimulation.js +++ b/source/components/GenericSimulation.js @@ -6,21 +6,24 @@ import Conversation from 'Components/conversation/Conversation' import withColours from 'Components/utils/withColours' import Targets from 'Components/Targets' import './GenericSimulation.css' +import { nextStepsSelector } from 'Selectors/analyseSelectors' @withColours @connect(state => ({ - previousAnswers: state.conversationSteps.foldedSteps + previousAnswers: state.conversationSteps.foldedSteps, + noNextSteps: nextStepsSelector(state).length == 0 })) export default class YO extends React.Component { state = { displayAnswers: false } render() { - let colours = this.props.colours + let { colours, noNextSteps, previousAnswers } = this.props + console.log(noNextSteps) return (

Quel est l'impact de vos douches ?

- {!isEmpty(this.props.previousAnswers) && ( + {!isEmpty(previousAnswers) && (
) diff --git a/source/components/Targets.js b/source/components/Targets.js index 2e6e675f2..d2a7c773b 100644 --- a/source/components/Targets.js +++ b/source/components/Targets.js @@ -23,7 +23,7 @@ export default class Targets extends React.Component { {/*{title} {' : '} */} - {nodeValue}{' '} + {nodeValue?.toFixed(1)}{' '} {unit}