diff --git a/src/components/Form/Form.js b/src/components/Form/Form.js index ea010ea9..298a183e 100644 --- a/src/components/Form/Form.js +++ b/src/components/Form/Form.js @@ -1,4 +1,4 @@ -import React , { useEffect } from "react" +import React, { useEffect } from "react" import MarkdownView from "react-showdown" import HubspotForm from "react-hubspot-form" import "./Form.scss" @@ -16,11 +16,16 @@ const Form = ({ location, data }) => { return () => { window.removeEventListener("message", handler) } - // eslint-disable-next-line react-hooks/exhaustive-deps - }, []) + // eslint-disable-next-line react-hooks/exhaustive-deps + }, []) function handler(event) { - if (event.origin === 'https://forms.hsforms.com'){ + if ( + event.origin === "https://forms.hsforms.com" || + event.origin === "https://site.dev.bitlogic.io" || + event.origin === "https://www.bitlogic.io"|| + event.origin === "https://preprod.d2mi1do1cquuwf.amplifyapp.com" + ) { if ( event.data.type === "hsFormCallback" && event.data.eventName === "onFormReady" @@ -33,12 +38,11 @@ const Form = ({ location, data }) => { } } } - console.log(event.origin, 'origin') - + console.log(event.origin, "origin") } const jqueryChange = elem => { - var event= new Event("HTMLEvents", {"bubbles":true, "cancelable":false}); + var event = new Event("HTMLEvents", { bubbles: true, cancelable: false }) elem.dispatchEvent(event) } @@ -54,9 +58,14 @@ const Form = ({ location, data }) => {
- {title &&

{title}

} + {title && ( +

{title}

+ )} {content && ( - + )}
hero