Amélioration de la simulation générique
parent
5a8e14469b
commit
12c68d1f8a
|
@ -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 (
|
||||
<div className="ui__ container" id="GenericSimulation">
|
||||
<h1>Quel est l'impact de vos douches ? </h1>
|
||||
{!isEmpty(this.props.previousAnswers) && (
|
||||
{!isEmpty(previousAnswers) && (
|
||||
<button
|
||||
style={{ background: colours.colour, color: colours.textColour }}
|
||||
onClick={() => this.setState({ displayAnswers: true })}>
|
||||
|
@ -34,6 +37,12 @@ export default class YO extends React.Component {
|
|||
<Conversation
|
||||
textColourOnWhite={this.props.colours.textColourOnWhite}
|
||||
/>
|
||||
{noNextSteps && (
|
||||
<>
|
||||
<h2>Plus de questions ! </h2>
|
||||
<p>Vous avez atteint l'estimation la plus précise.</p>
|
||||
</>
|
||||
)}
|
||||
<Targets />
|
||||
</div>
|
||||
)
|
||||
|
|
|
@ -23,7 +23,7 @@ export default class Targets extends React.Component {
|
|||
{/*<span className="title">{title}</span>
|
||||
{' : '} */}
|
||||
<span className="figure">
|
||||
<span className="value">{nodeValue}</span>{' '}
|
||||
<span className="value">{nodeValue?.toFixed(1)}</span>{' '}
|
||||
<span className="unit">{unit}</span>
|
||||
</span>
|
||||
<Link
|
||||
|
|
Loading…
Reference in New Issue