import React from 'react' import { flatRulesSelector, analysisWithDefaultsSelector } from 'Selectors/analyseSelectors' import { connect } from 'react-redux' import './ComparativeTargets.css' import withColours from 'Components/utils/withColours' import { Link } from 'react-router-dom' import emoji from 'react-easy-emoji' import { compose } from 'ramda' import simulationConfig from './simulateur-rémunération-dirigeant.yaml' import AnimatedTargetValue from './AnimatedTargetValue' import PeriodSwitch from 'Components/PeriodSwitch' import { findRuleByDottedName } from 'Engine/rules' export default compose( connect(state => ({ target: findRuleByDottedName( flatRulesSelector(state), simulationConfig.objectif ), analyses: analysisWithDefaultsSelector(state, simulationConfig) })), withColours )( class ComparativeTargets extends React.Component { render() { let { colours, analyses, target } = this.props return (