import Answers from 'Components/AnswerList' import Conversation from 'Components/conversation/Conversation' import { ScrollToElement } from 'Components/utils/Scroll' import withColours from 'Components/utils/withColours' import { compose, isEmpty } from 'ramda' import React from 'react' import { connect } from 'react-redux' import { nextStepsSelector, noUserInputSelector } from 'Selectors/analyseSelectors' import Animate from 'Ui/animate' export default compose( withColours, connect(state => ({ previousAnswers: state.conversationSteps.foldedSteps, noNextSteps: nextStepsSelector(state).length == 0, noUserInput: noUserInputSelector(state) })) )( class SimpleSimulation extends React.Component { state = { displayAnswers: false } render() { let { children, noNextSteps, previousAnswers, noUserInput, hideUntilUserInput } = this.props return ( <> {this.state.displayAnswers && ( this.setState({ displayAnswers: false })} /> )} {!isEmpty(previousAnswers) && ( )} {noNextSteps && ( <>

Plus de questions !

Vous avez atteint l'estimation la plus précise.

)} {(!hideUntilUserInput || !noUserInput) && ( {children} )}
) } } )