From b5a8eb25b6d00359a3f0f8f7260b8b106126b7fc Mon Sep 17 00:00:00 2001 From: Laurent Bossavit Date: Thu, 9 Nov 2017 11:25:15 +0100 Subject: [PATCH] :gear: Une seule situationGate suffit --- source/components/Simulateur.js | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/source/components/Simulateur.js b/source/components/Simulateur.js index 11ae0b916..9b83b85f6 100644 --- a/source/components/Simulateur.js +++ b/source/components/Simulateur.js @@ -1,7 +1,7 @@ import R from 'ramda' import React, {Component} from 'react' import Helmet from 'react-helmet' -import {formValueSelector, reset} from 'redux-form' +import {reset} from 'redux-form' import {connect} from 'react-redux' import {Redirect, Link, withRouter} from 'react-router-dom' import classNames from 'classnames' @@ -17,12 +17,9 @@ import {makeQuestion} from 'Engine/generateQuestions' import ReactPiwik from './Tracker' -let situationSelector = formValueSelector('conversation') - @withRouter @connect( state => ({ - situation: variableName => situationSelector(state, variableName), currentQuestion: state.currentQuestion, foldedSteps: state.foldedSteps, extraSteps: state.extraSteps, @@ -63,7 +60,7 @@ export default class extends Component { let {started} = this.state, - {foldedSteps, extraSteps, currentQuestion, situation, situationGate, themeColours} = this.props, + {foldedSteps, extraSteps, currentQuestion, situationGate, themeColours} = this.props, sim = path => R.path(R.unless(R.is(Array), R.of)(path))(this.rule.simulateur || {}), reinitalise = () => { @@ -115,8 +112,8 @@ export default class extends Component { }