import R from 'ramda' import React, { Component } from 'react' import classNames from 'classnames' import {Link} from 'react-router-dom' import {connect} from 'react-redux' import { withRouter } from 'react-router' import './Results.css' import {clearDict} from 'Engine/traverse' import {encodeRuleName} from 'Engine/rules' import RuleValueVignette from './rule/RuleValueVignette' @withRouter @connect( state => ({ analysis: state.analysis, targetName: state.targetName, conversationStarted: !R.isEmpty(state.form), conversationFirstAnswer: R.path(['form', 'conversation', 'values'])(state), situationGate: state.situationGate }) ) export default class Results extends Component { render() { let { analysis, targetName, conversationStarted, conversationFirstAnswer, location } = this.props if (!analysis) return null let {targets} = analysis let onRulePage = R.contains('/regle/')(location.pathname) return (
this.el = el} id="results"> {onRulePage && conversationStarted ?
Reprendre la simulation
:

{targets.length == 1 ? 'Votre objectif' : 'Vos objectifs'}

}