diff --git a/src/App.js b/src/App.js
index fe02834a61c288d1074ecf198c5252333fd1693b..24d5d31f12449f0152f5e90b16d9e6c490a0b45b 100644
--- a/src/App.js
+++ b/src/App.js
@@ -56,7 +56,10 @@ class App extends React.Component {
reviewQuestions: [],
questions: this.resetQuestions(),
pages: {
- thankYou: ,
+ thankYou: ,
congrats: ,
@@ -687,8 +690,6 @@ class App extends React.Component {
this.setState({
question,
prevQuestion: Object.keys(this.state.questions).includes(question) ? this.state.questions[question].prev : '',
- }, () => {
- console.log(this.state.questions);
});
}
@@ -839,6 +840,22 @@ class App extends React.Component {
}
submit = () => {
+ // 20 is the id for single family building type
+ if (this.state.questions.buildingTypes.value === 20) {
+ this.state.pages.thankYou = ;
+ }
+
+ // 1 - Yes & 2 - No for joining the waitlist
+ if(this.state.questions.waitList.value === 1) {
+ this.state.pages.thankYou = ;
+ }
+
+
this.setState({
submitted: true,
}, () => {
diff --git a/src/ThankYou.js b/src/ThankYou.js
index 12ed955a7ebc9bcd5d701c4a4c4432a9d919a14e..6c7ee28048cc1575542b5f220d0e44e4cd6ae257 100644
--- a/src/ThankYou.js
+++ b/src/ThankYou.js
@@ -2,27 +2,45 @@ import React from "react";
import result from './utils/images/spot-results-more-info.svg'; // with import
import './index.css';
-
const ThankYou = (props) => {
- const content = (
-
-

-
- Thank You!
-
-
- Looks like we need more information to see if your building is a good fit for air source heat pumps.
- We'll send you an email to find a time to chat or you can {' '}
- call us at {process.env.REACT_APP_BLOCPOWER_CONTACT}.
-
-
- );
+ // If building type is not single family (for NYC BIS) and for other surveys
+ var data =
+
+ Looks like we need more information to see if your building is a good fit for air source heat pumps.
+ We'll send you an email to find a time to chat or you can {' '}
+ call us at {process.env.REACT_APP_BLOCPOWER_CONTACT}.
+
- return (
+ // If building type is single family and user has joined the waitlist
+ if (props.singleFamily === true) {
+ data =
+ props.waitList === true ?
- {content}
+ Thanks for joining our waitlist!
+ We'll be in touch as soon as we expand our services!
+
+ If you’d like to reach out to us in the meantime you can call us at {process.env.REACT_APP_BLOCPOWER_CONTACT}.
+
:
+
+ Sorry to see you go! Come back any time if you change your mind!
+
+ }
+
+ const content = (
+
+

+
+ Thank You!
- );
+ { data }
+
+ );
+
+ return (
+
+ {content}
+
+ );
}
export default ThankYou;