mon-entreprise/source/components/Simulation.js

32 lines
777 B
JavaScript
Raw Normal View History

2019-05-21 08:58:55 +00:00
import Controls from 'Components/Controls'
import Conversation from 'Components/conversation/Conversation'
import TargetSelection from 'Components/TargetSelection'
import React from 'react'
2019-05-21 08:58:55 +00:00
import emoji from 'react-easy-emoji'
import { connect } from 'react-redux'
import { firstStepCompletedSelector } from 'Selectors/analyseSelectors'
2019-01-17 14:34:44 +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
</>
)}
</>
)
})