diff --git a/apps/website/src/assets/contact-success-hero.png b/apps/website/src/assets/contact-success-hero.png new file mode 100644 index 00000000..42e6e7a4 Binary files /dev/null and b/apps/website/src/assets/contact-success-hero.png differ diff --git a/apps/website/src/components/CalcomEmbedInline.astro b/apps/website/src/components/CalcomEmbedInline.astro index 93447f7e..a70cc6d6 100644 --- a/apps/website/src/components/CalcomEmbedInline.astro +++ b/apps/website/src/components/CalcomEmbedInline.astro @@ -60,7 +60,7 @@ const loadCalEmbed = () => { p(cal, ar); }; })(window, "https://app.cal.com/embed/embed.js", "init"); - Cal("init", "hello", { origin: "https://cal.com" }); + Cal("init", eventType, { origin: "https://cal.com" }); Cal.ns[eventType]("inline", { elementOrSelector, @@ -91,6 +91,24 @@ const loadCalEmbed = () => { hideEventTypeDetails, layout, }); + + Cal.ns[eventType]("on", { + action: "bookingSuccessful", + callback: (e) => { + const {data, type, namespace} = e.detail; + console.log("Booking successful:", {data, type, namespace}); + window.location.href = "/contact/success?src=calcom"; + } + }); + + Cal("on", { + action: "bookingSuccessful", + callback: (e) => { + const {data, type, namespace} = e.detail; + console.log("Global booking successful:", {data, type, namespace}); + window.location.href = "/contact/success?src=calcom"; + } + }); } if ("requestIdleCallback" in window) { diff --git a/apps/website/src/components/ContactUsForm.astro b/apps/website/src/components/ContactUsForm.astro index 1187e361..f35e52d3 100644 --- a/apps/website/src/components/ContactUsForm.astro +++ b/apps/website/src/components/ContactUsForm.astro @@ -197,12 +197,8 @@ import "../styles/loader.css"; return; } - if (notificationElem) { - notificationElem.classList.add("text-[#67a807]"); - notificationElem.innerHTML = notification.frontmatter.success; - hideLoader(); - clearForm(); - } + // Redirect to success page + window.location.href = "/contact/success"; }); } diff --git a/apps/website/src/pages/contact/success.astro b/apps/website/src/pages/contact/success.astro new file mode 100644 index 00000000..ccbe4d39 --- /dev/null +++ b/apps/website/src/pages/contact/success.astro @@ -0,0 +1,78 @@ +--- +import Base from "../../layouts/base.astro"; +import Navigation from "../../components/navigation.astro"; +import Section from "../../components/Section.astro"; +import { Image } from "astro:assets"; +import contactSuccessHero from "../../assets/contact-success-hero.png"; +--- + + + +
+
+
+
+ +
+ +
+ +
+

+ You're All Set! +

+
+ + +

+ + Your meeting is confirmed.
+ A calendar invite is on its way to your inbox.
+
+ Talk soon — we're looking forward to it. +

+ + + +
+
+ + + +
+
+
+ + + \ No newline at end of file diff --git a/apps/website/src/pages/staff-augmentation.astro b/apps/website/src/pages/staff-augmentation.astro index 2645b587..c1bff069 100644 --- a/apps/website/src/pages/staff-augmentation.astro +++ b/apps/website/src/pages/staff-augmentation.astro @@ -1,5 +1,5 @@ --- -import BookACallForm from "../components/BookACallForm.astro"; +import CalcomEmbedInline from "../components/CalcomEmbedInline.astro"; import Footer from "../components/footer.astro"; import Navigation from "../components/navigation.astro"; import Base from "../layouts/base.astro"; @@ -18,6 +18,7 @@ import handsPuzzleServiceIcon from "../assets/hands-puzzle-service-icon.svg"; import crmServiceIcon from "../assets/crm-service-icon.svg"; import circleCheckIcon from "../assets/circle-check-icon.svg"; import quoteIcon from "../assets/quote-icon.svg"; +import meetingImage from "../assets/meeting-croc.png"; import "../styles/main.css"; const { ogImage = "https://www.crocoder.dev/homepage-metadata-img.png" } = @@ -466,11 +467,52 @@ const { ogImage = "https://www.crocoder.dev/homepage-metadata-img.png" } = - - - Let's Build Together - - +
+
+ CroCoder team member in a video call consultation +
+
+ Book your call today +

+ Let's Build Together +

+

+ Stop wasting time being caught in operational bottlenecks. Schedule your + free call today, and let's help you deliver on your strategic vision with + confidence. Select a date below or + contact us here. +

+
+ +
+
+ +
+