diff --git a/source/components/Simu.js b/source/components/Simu.js index b616f8d13..091336a5e 100644 --- a/source/components/Simu.js +++ b/source/components/Simu.js @@ -2,7 +2,7 @@ import React, { Component } from 'react' import { connect } from 'react-redux' import { noUserInputSelector, - analysisWithDefaultsSelector + blockingInputControlsSelector } from 'Selectors/analyseSelectors' import Conversation from './conversation/Conversation' import FoldedSteps, { GoToAnswers } from './conversation/FoldedSteps' @@ -17,7 +17,7 @@ import withColours from './withColours' @withColours @connect(state => ({ noUserInput: noUserInputSelector(state), - analysis: analysisWithDefaultsSelector(state), + blockingInputControls: blockingInputControlsSelector(state), conversationStarted: state.conversationStarted })) export default class Simu extends Component { @@ -26,7 +26,7 @@ export default class Simu extends Component { colours, conversationStarted, noUserInput, - analysis: { blockingInputControls } + blockingInputControls } = this.props return ( diff --git a/source/components/TargetSelection.js b/source/components/TargetSelection.js index dbb4c7b19..1f8a9b2c6 100644 --- a/source/components/TargetSelection.js +++ b/source/components/TargetSelection.js @@ -10,7 +10,8 @@ import { change, Field, formValueSelector, reduxForm } from 'redux-form' import { analysisWithDefaultsSelector, flatRulesSelector, - noUserInputSelector + noUserInputSelector, + blockingInputControlsSelector } from 'Selectors/analyseSelectors' import BlueButton from './BlueButton' import CurrencyInput from './CurrencyInput/CurrencyInput' @@ -42,6 +43,7 @@ export let popularTargetNames = [ getTargetValue: dottedName => formValueSelector('conversation')(state, dottedName), analysis: analysisWithDefaultsSelector(state), + blockingInputControls: blockingInputControlsSelector(state), flatRules: flatRulesSelector(state), noUserInput: noUserInputSelector(state), conversationStarted: state.conversationStarted, @@ -56,7 +58,12 @@ export let popularTargetNames = [ ) export default class TargetSelection extends Component { render() { - let { conversationStarted, colours, noUserInput, analysis } = this.props + let { + conversationStarted, + colours, + noUserInput, + blockingInputControls + } = this.props return (
@@ -105,7 +111,8 @@ export default class TargetSelection extends Component { activeInput, setActiveInput, analysis, - noUserInput + noUserInput, + blockingInputControls } = this.props, targets = analysis ? analysis.targets : [] @@ -130,8 +137,7 @@ export default class TargetSelection extends Component { setActiveInput, setFormValue: this.props.setFormValue, noUserInput, - blockingInputControls: - analysis && analysis.blockingInputControls + blockingInputControls }} />