"use client" import { useState } from "react" export default function Contact() { const [form, setForm] = useState({ first_name: "", last_name: "", email: "", phone_number: "", project_details: "" }) const [loading, setLoading] = useState(false) const [message, setMessage] = useState("") // handle change const handleChange = (e) => { setForm({ ...form, [e.target.name]: e.target.value }) } // validation const validate = () => { if (!form.first_name || !form.last_name) return "Name required" if (!form.email.includes("@")) return "Valid email required" if (form.phone_number.length < 8) return "Valid phone required" if (!form.project_details) return "Project details required" return null } // submit const handleSubmit = async (e) => { e.preventDefault() const error = validate() if (error) { setMessage(error) return } setLoading(true) setMessage("") try { const res = await fetch( "https://rgnbdafzoeryijdgmyuu.supabase.co/functions/v1/submit-form", { method: "POST", headers: { "Content-Type": "application/json", "Authorization": "Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6InJnbmJkYWZ6b2VyeWlqZGdteXV1Iiwicm9sZSI6ImFub24iLCJpYXQiOjE3NzY3NjUyODksImV4cCI6MjA5MjM0MTI4OX0.-PuetNc8pmKhQfCS8jS9xGAjaBA2O26qR9oSRVVvNs4" }, body: JSON.stringify(form) } ) if (!res.ok) throw new Error("Failed") setMessage("✅ Form submitted successfully!") setForm({ first_name: "", last_name: "", email: "", phone_number: "", project_details: "" }) } catch (err) { setMessage("❌ Something went wrong") } setLoading(false) } return (
{/* TOP */}
Let’s Start Your Project

Schedule a complimentary Consultation
with our design team

{/* LEFT */}

Get In Touch

Contact us today for tailored marketing strategies and expert advice.

Phone Number +15107099142
Email Address reimagine@housecoin.biz
Office Hours MON–FRI: 8AM – 6PM SATURDAY: 9AM – 3PM
{/* RIGHT FORM */}

Send us a Message