diff --git a/nuxt-frontend/components/contact/CalendlyIframe.vue b/nuxt-frontend/components/contact/CalendlyIframe.vue index bc4ca48d3..63e9f50d7 100644 --- a/nuxt-frontend/components/contact/CalendlyIframe.vue +++ b/nuxt-frontend/components/contact/CalendlyIframe.vue @@ -20,6 +20,9 @@ diff --git a/nuxt-frontend/pages/thank-you.vue b/nuxt-frontend/pages/thank-you.vue index 47f9db2f8..5a1c68aa6 100644 --- a/nuxt-frontend/pages/thank-you.vue +++ b/nuxt-frontend/pages/thank-you.vue @@ -56,6 +56,10 @@ import Header from "@/components/partials/NewHeader.vue"; import LandingSection from "@/components/contact/thank-you/LandingSection.vue"; import { elementInViewPort } from "@/utils.js"; import CalendlyIframe from "@/components/contact/CalendlyIframe.vue"; +import { contactDetailStore } from "@/stores/contact"; + +const store = contactDetailStore(); +const isMeetingScheduled = computed(() => store.isMeetingScheduled); const BenefitSection = defineAsyncComponent( () => import("@/components/contact/thank-you/BenefitSection.vue"), @@ -100,7 +104,10 @@ onMounted(() => { }); window.addEventListener("scroll", sendEvent); $mixpanel.track("view_thankyou_page"); - openCalendlyIframe(); + + if (!isMeetingScheduled.value) { + openCalendlyIframe(); + } }); onUnmounted(() => { diff --git a/nuxt-frontend/stores/contact/index.js b/nuxt-frontend/stores/contact/index.js new file mode 100644 index 000000000..39972bf80 --- /dev/null +++ b/nuxt-frontend/stores/contact/index.js @@ -0,0 +1,16 @@ +import { defineStore } from "pinia"; + +export const contactDetailStore = defineStore("contact-detail", { + state: () => { + return { + isMeetingScheduled: false, + }; + }, + actions: { + async setMeetingScheduled() { + return new Promise(() => { + this.isMeetingScheduled = true; + }); + }, + }, +});