import PeriodSwitch from 'Components/PeriodSwitch' import withColours from 'Components/utils/withColours' import { findRuleByDottedName } from 'Engine/rules' import { compose } from 'ramda' import React from 'react' import emoji from 'react-easy-emoji' import { connect } from 'react-redux' import { Link } from 'react-router-dom' import { formValueSelector } from 'redux-form' import { analysisWithDefaultsSelector, flatRulesSelector } from 'Selectors/analyseSelectors' import AnimatedTargetValue from './AnimatedTargetValue' import './ComparativeTargets.css' export default compose( connect( state => ({ target: findRuleByDottedName( flatRulesSelector(state), state.simulationConfig?.objectifs[0] ), simulationBranches: state.simulationConfig?.branches, analyses: analysisWithDefaultsSelector(state) }), dispatch => ({ setSituationBranch: id => dispatch({ type: 'SET_SITUATION_BRANCH', id }) }) ), withColours )( class ComparativeTargets extends React.Component { render() { let { colours, analyses, target, setSituationBranch, simulationBranches } = this.props if (!simulationBranches) { return null } // We retrieve the values necessary to compute the global % of taxes // This is not elegant let getRatioPrélèvements = analysis => analysis.targets.find(t => t.dottedName === 'ratio de prélèvements') return (

{target.title}

) } } )