diff --git a/components/MailingList/index.jsx b/components/MailingList/index.jsx index e3b41ba..db1787c 100644 --- a/components/MailingList/index.jsx +++ b/components/MailingList/index.jsx @@ -1,9 +1,38 @@ "use client"; - +import { useState } from "react"; import Image from "next/image"; import FadeInView from "@/components/FadeInView"; const MailingList = () => { + const [email, setEmail] = useState(""); + const [submitted, setSubmitted] = useState(false); + + const handleSubscribe = async () => { + if (!email) return; + + const formData = new FormData(); + formData.append("entry.1008749988", email); + + try { + await fetch( + // Removed the '/e/' from the URL below + "https://docs.google.com/forms/d/1APq2vApbi9Aysa-h_9cKiNxl2o77UnOojfVztmgdUDc/formResponse", + { + method: "POST", + body: formData, + mode: "no-cors", // This is crucial, explained below + } + ); + + // Since 'no-cors' is opaque, we assume success if no error was thrown + setEmail(""); + setSubmitted(true); + } catch (error) { + console.error("Form submission failed", error); + } + }; + + return (
{/* Lightning Left - no animation (decorative background) */} @@ -143,6 +172,8 @@ const MailingList = () => { setEmail(e.target.value)} className=" w-full h-12 md:h-20 @@ -159,6 +190,8 @@ const MailingList = () => { font-kanit" />
diff --git a/components/sections/stats-section.tsx b/components/sections/stats-section.tsx index 461c3e5..c70798e 100644 --- a/components/sections/stats-section.tsx +++ b/components/sections/stats-section.tsx @@ -68,7 +68,7 @@ async function StatsSection() { text-stroke-number [-webkit-text-stroke:8px_#62009b] md:[-webkit-text-stroke:14px_#62009b] - lg:[-webkit-text-stroke:20px_#62009b] + font-extrabold text-[32px] md:text-[81px] leading-none"