diff --git a/src/app/contact/page.tsx b/src/app/contact/page.tsx new file mode 100644 index 0000000..3287ec5 --- /dev/null +++ b/src/app/contact/page.tsx @@ -0,0 +1,59 @@ +"use client"; + +import ContactForm from "@/components/contact/ContactForm"; +import ContactMethods from "@/components/contact/ContactMethods"; +import SupportHours from "@/components/contact/SupportHours"; +import QuickHelp from "@/components/contact/QuickHelp"; +import OfficeLocations from "@/components/contact/OfficeLocations"; +import { ThemeToggle } from "@/components/theme-toggle"; +import Link from "next/link"; +import { Send } from "lucide-react"; + +export default function ContactPage() { + return ( +
+
+
+ +
+ +
+ ChainRemit + +
+ + Home + + +
+
+
+ +
+
+

+ Get in Touch +

+

+ Have questions or need help? We're here to assist you. Reach out to + our team and we'll get back to you as soon as possible. +

+
+
+
+ +
+
+ + +
+
+ + +
+
+ ); +} \ No newline at end of file diff --git a/src/components/contact/ContactForm.tsx b/src/components/contact/ContactForm.tsx new file mode 100644 index 0000000..aab54b0 --- /dev/null +++ b/src/components/contact/ContactForm.tsx @@ -0,0 +1,174 @@ +"use client"; + +import { useState } from "react"; +import { Card, CardContent, CardHeader, CardTitle } from "@/components/ui/card"; +import { Button } from "@/components/ui/button"; +import { Input } from "@/components/ui/input"; +import { Label } from "@/components/ui/label"; +import { Textarea } from "@/components/ui/textarea"; +import { + Select, + SelectContent, + SelectItem, + SelectTrigger, + SelectValue, +} from "@/components/ui/select"; +import { Send, Loader2, CheckCircle, AlertCircle } from "lucide-react"; +import { useContactForm } from "@/hooks/useContactForm"; + +const ContactForm = () => { + const [formData, setFormData] = useState({ + fullName: "", + email: "", + category: "", + subject: "", + message: "", + }); + const { submitForm, loading, success, error } = useContactForm(); + + const handleSubmit = async (e: React.FormEvent) => { + e.preventDefault(); + + const res = await submitForm(formData); + if (res.success) { + setFormData({ + fullName: "", + email: "", + category: "", + subject: "", + message: "", + }); + } + }; + + // Just a helper to update fields + const updateField = (field: string, value: string) => { + setFormData((prev) => ({ ...prev, [field]: value })); + }; + + return ( + + + Send us a Message +

+ Fill out the form below and we'll respond within 24 hours +

+
+ +
+
+
+ + updateField("fullName", e.target.value)} + placeholder="Your full name" + className="mt-1" + disabled={loading} + required + /> +
+
+ + updateField("email", e.target.value)} + placeholder="your@email.com" + className="mt-1" + disabled={loading} + required + /> +
+
+ +
+
+ + +
+
+ + updateField("subject", e.target.value)} + placeholder="Brief description of your inquiry" + className="mt-1" + disabled={loading} + /> +
+
+ +
+ +