From 5936aedd3d853514a31ebece23175255fb2415c3 Mon Sep 17 00:00:00 2001 From: Arslaan Pathan Date: Mon, 31 Aug 2026 17:00:12 +1200 Subject: Initial commit --- components/request-form.tsx | 145 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 145 insertions(+) create mode 100644 components/request-form.tsx (limited to 'components/request-form.tsx') diff --git a/components/request-form.tsx b/components/request-form.tsx new file mode 100644 index 0000000..8f61337 --- /dev/null +++ b/components/request-form.tsx @@ -0,0 +1,145 @@ +"use client"; + +import { useState } from "react"; +import { Button } from "@/components/ui/button"; +import { Input } from "@/components/ui/input"; +import { Label } from "@/components/ui/label"; +import { Textarea } from "@/components/ui/textarea"; + +const consumerDomains = [ + "gmail.com", + "yahoo.com", + "hotmail.com", + "outlook.com", + "icloud.com", + "aol.com", + "proton.me", + "protonmail.com", +]; + +type Status = "idle" | "loading" | "success" | "error"; + +export function RequestForm() { + const [status, setStatus] = useState("idle"); + const [error, setError] = useState(""); + + async function onSubmit(e: React.FormEvent) { + e.preventDefault(); + setError(""); + const form = e.currentTarget; + const data = new FormData(form); + const name = String(data.get("name") || "").trim(); + const email = String(data.get("email") || "").trim(); + const company = String(data.get("company") || "").trim(); + const role = String(data.get("role") || "").trim(); + const outcomes = String(data.get("outcomes") || "").trim(); + + if (!name || !email || !company || !role || !outcomes) { + setStatus("error"); + setError("Every field is required. Alignment begins with completeness."); + return; + } + + const domain = email.split("@")[1]?.toLowerCase(); + if (!domain || !email.includes("@")) { + setStatus("error"); + setError("Please provide an institutional email."); + return; + } + if (consumerDomains.includes(domain)) { + setStatus("error"); + setError( + "Consumer inboxes cannot attest PPoE. Please use your institutional email." + ); + return; + } + + setStatus("loading"); + await new Promise((r) => setTimeout(r, 900)); + setStatus("success"); + } + + if (status === "success") { + return ( +
+

+ Request received +

+

+ An outcomes partner will be in touch. +

+

+ Fit is a mutual decision. If your operating thesis, your lake, and + our fabric are prepared to compound, we will schedule a working + session — not a demo. +

+
+ ); + } + + return ( +
+ + + + +
+ +