import React, { Component } from 'react' import { Trans, translate } from 'react-i18next' import { connect } from 'react-redux' import { withRouter } from 'react-router' import './ProgressTip.css' import { Line } from 'rc-progress' @withRouter @connect(state => ({ foldedSteps: state.foldedSteps, nextSteps: state.nextSteps, colour: state.themeColours.colour, conversationTargetNames: state.conversationTargetNames })) @translate() export default class ProgressTip extends Component { render() { let { nextSteps, foldedSteps, colour, conversationTargetNames } = this.props, nbQuestions = nextSteps.length if (conversationTargetNames && conversationTargetNames.length === 0) return nbQuestions ? (
Vous aurez {nextSteps.length} questions !
) : null if (!conversationTargetNames) return null return ( nbQuestions != 0 && ({nbQuestions === 1 ? 'Une dernière question !' : `Moins de ${nbQuestions} questions`}