diff --git a/client/components/wix/LeadForm.tsx b/client/components/wix/LeadForm.tsx index 6b134718..5b5fbdd3 100644 --- a/client/components/wix/LeadForm.tsx +++ b/client/components/wix/LeadForm.tsx @@ -1,6 +1,12 @@ import { useEffect, useMemo, useState } from "react"; import { Button } from "@/components/ui/button"; -import { Card, CardContent, CardDescription, CardHeader, CardTitle } from "@/components/ui/card"; +import { + Card, + CardContent, + CardDescription, + CardHeader, + CardTitle, +} from "@/components/ui/card"; import { Input } from "@/components/ui/input"; import { Label } from "@/components/ui/label"; import { Textarea } from "@/components/ui/textarea"; @@ -36,11 +42,15 @@ export default function LeadForm() { })); }, [inferred.full, inferred.email]); - const update = (k: keyof typeof form) => (e: any) => setForm({ ...form, [k]: e.target.value }); + const update = (k: keyof typeof form) => (e: any) => + setForm({ ...form, [k]: e.target.value }); const submit = async () => { if (!form.email) { - toast({ title: "Email required", description: "Please provide a valid email." }); + toast({ + title: "Email required", + description: "Please provide a valid email.", + }); return; } setLoading(true); @@ -53,10 +63,17 @@ export default function LeadForm() { const ok = r.ok; const data = await r.json().catch(() => ({})); if (!ok) throw new Error(data?.error || `Request failed (${r.status})`); - toast({ title: "Thanks!", description: "We’ll follow up shortly with next steps." }); + toast({ + title: "Thanks!", + description: "We’ll follow up shortly with next steps.", + }); setForm({ ...form, message: "" }); } catch (e: any) { - toast({ title: "Submission failed", description: e?.message || "Try again later.", variant: "destructive" as any }); + toast({ + title: "Submission failed", + description: e?.message || "Try again later.", + variant: "destructive" as any, + }); } finally { setLoading(false); } @@ -67,39 +84,81 @@ export default function LeadForm() { Start a Wix project - Tell us a bit about your goals. We’ll get back within 1 business day. + + Tell us a bit about your goals. We’ll get back within 1 business + day. +
- +
- +
- +
- +
- +
- +
-