From f0b88aa673e730a49bb0bb7cb4fabcd21807d76e Mon Sep 17 00:00:00 2001 From: bender Date: Thu, 5 Mar 2026 16:59:58 +0000 Subject: [PATCH] Add src/app/contact/page.tsx --- src/app/contact/page.tsx | 228 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 228 insertions(+) create mode 100644 src/app/contact/page.tsx diff --git a/src/app/contact/page.tsx b/src/app/contact/page.tsx new file mode 100644 index 0000000..c4f2cd4 --- /dev/null +++ b/src/app/contact/page.tsx @@ -0,0 +1,228 @@ +"use client" + +import { ThemeProvider } from "@/providers/themeProvider/ThemeProvider"; +import NavbarStyleApple from '@/components/navbar/NavbarStyleApple/NavbarStyleApple'; +import FooterBaseReveal from '@/components/sections/footer/FooterBaseReveal'; +import { useState } from 'react'; +import { Mail } from 'lucide-react'; + +export default function ContactPage() { + const [formData, setFormData] = useState({ + name: '', + email: '', + phone: '', + message: '' + }); + const [submitted, setSubmitted] = useState(false); + const [isLoading, setIsLoading] = useState(false); + + const handleChange = (e: React.ChangeEvent) => { + const { name, value } = e.target; + setFormData(prev => ({ + ...prev, + [name]: value + })); + }; + + const handleSubmit = async (e: React.FormEvent) => { + e.preventDefault(); + setIsLoading(true); + + try { + const response = await fetch('https://formspree.io/f/xqazdbrj', { + method: 'POST', + headers: { + 'Content-Type': 'application/json', + }, + body: JSON.stringify({ + ...formData, + _to: 'guanalv.92@outlook.com' + }) + }); + + if (response.ok) { + setSubmitted(true); + setFormData({ name: '', email: '', phone: '', message: '' }); + setTimeout(() => setSubmitted(false), 5000); + } + } catch (error) { + console.error('Error submitting form:', error); + } finally { + setIsLoading(false); + } + }; + + return ( + + + +
+
+
+
+ +
+

Get Your Free Estimate

+

Contact us today for a free, no-obligation painting estimate

+

We'll get back to you within 24 hours

+
+ + {submitted && ( +
+

Thank you for your message!

+

We've received your quote request and will contact you soon at {formData.email}

+
+ )} + +
+
+ + +
+ +
+ + +
+ +
+ + +
+ +
+ +