From 9c87b91de68bf712da5d706473d01de54e0dc333 Mon Sep 17 00:00:00 2001 From: jyswee Date: Thu, 23 Jul 2026 22:13:18 +0000 Subject: [PATCH] Seed: photography template (19 files) --- src/pages/Contact.tsx | 177 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 177 insertions(+) create mode 100644 src/pages/Contact.tsx diff --git a/src/pages/Contact.tsx b/src/pages/Contact.tsx new file mode 100644 index 0000000..11dfdc5 --- /dev/null +++ b/src/pages/Contact.tsx @@ -0,0 +1,177 @@ +import { useState } from "react"; +import { Button } from "@/components/ui/button"; +import { Input } from "@/components/ui/input"; +import { Textarea } from "@/components/ui/textarea"; +import { Label } from "@/components/ui/label"; +import { Card, CardContent } from "@/components/ui/card"; +import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@/components/ui/select"; +import { Accordion, AccordionContent, AccordionItem, AccordionTrigger } from "@/components/ui/accordion"; +import { MapPin, Mail, Phone, Send } from "lucide-react"; +import { toast } from "sonner"; +import { useSaasMutation } from "@/hooks/use-tygarun"; +import Header from "@/components/Header"; +import Footer from "@/components/Footer"; + +export default function ContactPage() { + const [sending, setSending] = useState(false); + const [sessionType, setSessionType] = useState(""); + const [budget, setBudget] = useState(""); + // Session booking is LIVE via tyga.run scheduling + const { mutate: bookSession } = useSaasMutation("scheduling", "/bookings"); + + const handleSubmit = async (e: React.FormEvent) => { + e.preventDefault(); + const fd = new FormData(e.currentTarget); + setSending(true); + try { + await bookSession({ + name: fd.get("name"), + email: fd.get("email"), + sessionType, + date: fd.get("date"), + location: fd.get("location"), + budget, + message: fd.get("message"), + }); + toast.success("Your session request is in, I will confirm within 24 hours."); + e.currentTarget.reset(); + setSessionType(""); + setBudget(""); + } catch (err) { + toast.error("Something went wrong. Please try again or email me directly."); + } finally { + setSending(false); + } + }; + + return ( +
+
+ +
+
+

Get in Touch

+

Have a project in mind? I would love to hear your story. Fill out the form and I will get back to you within 24 hours.

+ +
+ {/* ── FORM ── */} +
+
+
+ + +
+
+ + +
+
+ +
+
+ + +
+
+ + +
+
+ +
+
+ + +
+
+ + +
+
+ +
+ +