From d9024c37ab73b48689b1e08a04409781342f1aa4 Mon Sep 17 00:00:00 2001 From: jyswee Date: Thu, 23 Jul 2026 22:14:07 +0000 Subject: [PATCH] Seed: travel template (16 files) --- src/pages/Contact.tsx | 188 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 188 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..a51ecf9 --- /dev/null +++ b/src/pages/Contact.tsx @@ -0,0 +1,188 @@ +import { useState } from "react"; +import { Button } from "@/components/ui/button"; +import { Card, CardContent } from "@/components/ui/card"; +import { Badge } from "@/components/ui/badge"; +import { Input } from "@/components/ui/input"; +import { Textarea } from "@/components/ui/textarea"; +import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@/components/ui/select"; +import { Accordion, AccordionContent, AccordionItem, AccordionTrigger } from "@/components/ui/accordion"; +import { MapPin, Phone, Mail, Clock, 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 { mutate: createBooking, loading: sending } = useSaasMutation("scheduling", "/bookings"); + const [destination, setDestination] = useState(""); + const [groupSize, setGroupSize] = useState(""); + + const handleSubmit = async (e: React.FormEvent) => { + e.preventDefault(); + const data = new FormData(e.currentTarget); + try { + await createBooking({ + name: data.get("name"), + email: data.get("email"), + phone: data.get("phone"), + destination, + dates: data.get("dates"), + groupSize, + message: data.get("message"), + }); + toast.success("Message sent! Our travel experts will get back to you within 24 hours."); + e.currentTarget.reset(); + setDestination(""); + setGroupSize(""); + } catch (err) { + toast.error("Could not send your inquiry. Please try again."); + } + }; + + return ( +
+
+ + {/* ── HERO ── */} +
+
+ Get in Touch +

Plan Your Trip

+

Tell us about your dream destination and we will craft the perfect itinerary.

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

Trip Inquiry

+
+
+
+ + +
+
+ + +
+
+
+
+ + +
+
+ + +
+
+
+
+ + +
+
+ + +
+
+
+ +