2019-05-21 08:58:55 +00:00
|
|
|
import Controls from 'Components/Controls'
|
2019-02-15 10:33:07 +00:00
|
|
|
import Conversation from 'Components/conversation/Conversation'
|
2019-05-20 15:01:47 +00:00
|
|
|
import TargetSelection from 'Components/TargetSelection'
|
|
|
|
import React from 'react'
|
2019-05-21 08:58:55 +00:00
|
|
|
import emoji from 'react-easy-emoji'
|
2019-02-15 10:33:07 +00:00
|
|
|
import { connect } from 'react-redux'
|
2019-05-20 15:01:47 +00:00
|
|
|
import { firstStepCompletedSelector } from 'Selectors/analyseSelectors'
|
2019-01-17 14:34:44 +00:00
|
|
|
|
2019-05-20 15:01:47 +00:00
|
|
|
export default connect(state => ({
|
|
|
|
firstStepCompleted: firstStepCompletedSelector(state)
|
|
|
|
}))(function Simulation({
|
|
|
|
firstStepCompleted,
|
|
|
|
explanations,
|
|
|
|
customEndMessages
|
|
|
|
}) {
|
|
|
|
return (
|
|
|
|
<>
|
|
|
|
<TargetSelection />
|
|
|
|
{firstStepCompleted && (
|
2019-01-17 14:34:44 +00:00
|
|
|
<>
|
2019-05-21 08:58:55 +00:00
|
|
|
<Controls />
|
|
|
|
<h2>{emoji('📝 ')}Votre simulation</h2>
|
|
|
|
<>
|
|
|
|
<Conversation customEndMessages={customEndMessages} />
|
|
|
|
{explanations}
|
|
|
|
</>
|
2019-01-17 14:34:44 +00:00
|
|
|
</>
|
2019-05-20 15:01:47 +00:00
|
|
|
)}
|
|
|
|
</>
|
|
|
|
)
|
|
|
|
})
|