diff --git a/src/App.js b/src/App.js index 15567fff54a069139513b794e43b8b3fa387525b..a93264a2dd19c52991b2aed5f2a8f7a4fae2ee86 100644 --- a/src/App.js +++ b/src/App.js @@ -863,13 +863,18 @@ class App extends React.Component { if (found === false) { const questions = this.state.questions; - questions.buildingTypes.next = 'financeInterest'; + if (this.state.factors.buildingTypes === 21) { + questions.buildingTypes.next = 'utilityBills'; + questions.financeInterest.prev = 'comfortIssues'; + } else { + questions.buildingTypes.next = 'financeInterest'; + questions.financeInterest.prev = 'buildingTypes'; + } questions.financeInterest.next = 'reviewAnswers'; - questions.financeInterest.prev = 'buildingTypes'; questions.reviewAnswers.next = 'thankYou'; questions.contact.next = "reviewAnswers"; this.setState({ questions }, () => { - this.setQuestion('financeInterest'); + this.setQuestion(questions.buildingTypes.next); }); } diff --git a/src/UnitBreakdown.js b/src/UnitBreakdown.js index c8506919c4d5a1e7b09ac4ad286c5c970dcd1413..75f8e8d5fa70578d6526cdce7c400dee62a55f75 100644 --- a/src/UnitBreakdown.js +++ b/src/UnitBreakdown.js @@ -42,7 +42,7 @@ export default class UnitBreakDown extends React.Component { } prevQuestion = () => { - this.props.prevQuestion('unitBreakDown'); + this.props.prevQuestion('unitBreakdown'); } nextQuestion = () => { diff --git a/src/constants.js b/src/constants.js index 3d378fdbd47ddbf0eaa1e5283cc450d6ef696663..fac0d9e98f5bd90f32952bc3afdce336ae6117b0 100644 --- a/src/constants.js +++ b/src/constants.js @@ -89,7 +89,7 @@ const questionTree = [ heatDistribution: [10], heatingSystemAge: [13, 14, 15, 16, 12], heatingSystemPlan: [17, 18, 19, 12], - buildingTypes: [21, 23, 22, 32, 33], + buildingTypes: [23, 22, 32, 33], }, output: { nextQuestion: 'financeInterest',