mon-entreprise/source/components/SalaryExplanation.js

52 lines
1.3 KiB
JavaScript
Raw Normal View History

import { React, T } from 'Components'
import PageFeedback from 'Components/Feedback/PageFeedback'
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,
connect(state => ({
showCompactView: !!state.conversationSteps.foldedSteps.length
}))
2019-01-17 14:34:44 +00:00
)(
class SalaryExplanation extends React.Component {
2019-01-17 14:34:44 +00:00
render() {
return (
<Animate.fromTop>
{!this.props.showCompactView ? (
<>
2019-05-21 08:58:55 +00:00
{/* <PageFeedback
customMessage={
<T k="feedback.simulator">
Êtes-vous satisfait de ce simulateur ?
</T>
}
customEventName="rate simulator"
2019-05-21 08:58:55 +00:00
/> */}
<SalaryFirstExplanation {...this.props} />
{this.props.protectionText}
</>
2019-01-17 14:34:44 +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' }} />
</Animate.fromTop>
2019-01-17 14:34:44 +00:00
)
}
}
)