From 60dbe586d6a37406259e32fdc5c9df33b4b10cdd Mon Sep 17 00:00:00 2001 From: "Builder.io" Date: Sat, 18 Oct 2025 21:45:10 +0000 Subject: [PATCH] Create Investors page with interest form and realm tie-in cgen-8f27649e291f46fb9e5aed454f4f6bfc --- client/pages/Investors.tsx | 125 +++++++++++++++++++++++++++++++++++++ 1 file changed, 125 insertions(+) create mode 100644 client/pages/Investors.tsx diff --git a/client/pages/Investors.tsx b/client/pages/Investors.tsx new file mode 100644 index 00000000..09c8a7eb --- /dev/null +++ b/client/pages/Investors.tsx @@ -0,0 +1,125 @@ +import Layout from "@/components/Layout"; +import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card"; +import { Button } from "@/components/ui/button"; +import { Badge } from "@/components/ui/badge"; +import { Input } from "@/components/ui/input"; +import { Textarea } from "@/components/ui/textarea"; +import { useAuth } from "@/contexts/AuthContext"; +import { useState } from "react"; +import { useToast } from "@/hooks/use-toast"; + +export default function Investors() { + const { user, profile, updateProfile } = useAuth(); + const { toast } = useToast(); + const [name, setName] = useState(""); + const [email, setEmail] = useState(""); + const [amount, setAmount] = useState(""); + const [accredited, setAccredited] = useState(false); + const [message, setMessage] = useState(""); + const [submitting, setSubmitting] = useState(false); + + const submit = async () => { + if (!email.trim()) { + toast({ variant: "destructive", description: "Email is required" }); + return; + } + setSubmitting(true); + try { + const resp = await fetch("/api/investors/interest", { + method: "POST", + headers: { "Content-Type": "application/json" }, + body: JSON.stringify({ name, email, amount, accredited, message }), + }); + if (!resp.ok) throw new Error("Failed to submit"); + toast({ title: "Thanks!", description: "We’ll follow up with next steps." }); + setName(""); setEmail(""); setAmount(""); setMessage(""); setAccredited(false); + } catch (e: any) { + toast({ variant: "destructive", description: e?.message || "Try again later" }); + } finally { + setSubmitting(false); + } + }; + + const activateClientRealm = async () => { + try { + await updateProfile({ user_type: "client" as any }); + toast({ title: "Realm set", description: "Client realm activated" }); + } catch (e: any) { + toast({ variant: "destructive", description: e?.message || "Could not update realm" }); + } + }; + + const isClientRealm = (profile as any)?.user_type === "client"; + + return ( + +
+
+ Investors +

Partner with AeThex

+

Learn about our vision, traction, and how to participate in future financings. This page is informational and not an offer to sell securities.

+
+ +
+ + + Investor interest + Request our investor packet and updates + + + setName(e.target.value)} /> + setEmail(e.target.value)} /> + setAmount(e.target.value)} /> + +