2019-04-17 09:13:35 +00:00
|
|
|
import { React, T } from 'Components'
|
2019-04-24 10:19:30 +00:00
|
|
|
import PageFeedback from 'Components/Feedback/PageFeedback'
|
2019-02-12 14:59:01 +00:00
|
|
|
import withTracker from 'Components/utils/withTracker'
|
|
|
|
import { compose } from 'ramda'
|
|
|
|
import { connect } from 'react-redux'
|
|
|
|
import * as Animate from 'Ui/animate'
|
|
|
|
import SalaryCompactExplanation from './SalaryCompactExplanation'
|
|
|
|
import SalaryFirstExplanation from './SalaryFirstExplanation'
|
2019-01-17 14:34:44 +00:00
|
|
|
|
|
|
|
export default compose(
|
|
|
|
withTracker,
|
2019-04-24 10:19:30 +00:00
|
|
|
connect(state => ({
|
2019-05-20 15:01:47 +00:00
|
|
|
showCompactView: !!state.conversationSteps.foldedSteps.length
|
2019-04-24 10:19:30 +00:00
|
|
|
}))
|
2019-01-17 14:34:44 +00:00
|
|
|
)(
|
2019-04-19 13:23:40 +00:00
|
|
|
class SalaryExplanation extends React.Component {
|
2019-01-17 14:34:44 +00:00
|
|
|
render() {
|
|
|
|
return (
|
2019-04-30 13:03:30 +00:00
|
|
|
<Animate.fromTop>
|
2019-05-20 15:01:47 +00:00
|
|
|
{!this.props.showCompactView ? (
|
2019-04-17 09:13:35 +00:00
|
|
|
<>
|
2019-04-24 10:19:30 +00:00
|
|
|
{this.props.protectionText}
|
|
|
|
<PageFeedback
|
|
|
|
customMessage={
|
|
|
|
<T k="feedback.simulator">
|
|
|
|
Êtes-vous satisfait de ce simulateur ?
|
|
|
|
</T>
|
|
|
|
}
|
|
|
|
customEventName="rate simulator"
|
|
|
|
/>
|
2019-04-17 09:13:35 +00:00
|
|
|
<SalaryFirstExplanation {...this.props} />
|
|
|
|
</>
|
2019-01-17 14:34:44 +00:00
|
|
|
) : (
|
2019-04-24 10:19:30 +00:00
|
|
|
<>
|
|
|
|
<SalaryCompactExplanation {...this.props} />
|
|
|
|
<PageFeedback
|
|
|
|
customMessage={
|
|
|
|
<T k="feedback.simulator">
|
|
|
|
Êtes-vous satisfait de ce simulateur ?
|
|
|
|
</T>
|
|
|
|
}
|
|
|
|
customEventName="rate simulator"
|
|
|
|
/>
|
|
|
|
</>
|
2019-01-17 14:34:44 +00:00
|
|
|
)}
|
|
|
|
<div style={{ textAlign: 'center' }} />
|
2019-04-17 09:13:35 +00:00
|
|
|
</Animate.fromTop>
|
2019-01-17 14:34:44 +00:00
|
|
|
)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
)
|