'use client'; import { useState } from "react"; import toast from "react-hot-toast"; export default function Start() { const [form, setForm] = useState({ name: "", company: "", website: "", project_type: "", budget: "", timeline: "", description: "" }); const [loading, setLoading] = useState(false); const handleChange = (e: any) => { setForm({ ...form, [e.target.name]: e.target.value }); }; const handleSubmit = async (e: any) => { e.preventDefault(); setLoading(true); try { const res = await fetch("/api/submit", { method: "POST", headers: { "Content-Type": "application/json", }, body: JSON.stringify(form), }); const data = await res.json(); console.log(data); toast.success("Form Submitted Successfully 🚀"); setForm({ name: "", company: "", website: "", project_type: "", budget: "", timeline: "", description: "" }); } catch (err) { console.error(err); toast.error("Something went wrong ❌"); } setLoading(false); }; return ( <>
{/* center content */}

Start A Project

Tell us what you're building. We'll structure the rest.

{/* joined users */}

100+ people already joined
the AAideA

{/* =========================== CONTACT FORM SECTION =========================== */}
{/* LEFT INFO */}
(123) 666-2343 hello@ovela.com
{/* RIGHT FORM */}

Let's Build it Properly.

Tell us what you're building. We'll structure the rest.

{/* Name */}
{/* Company */}
{/* Website */}
{/* Project Type */}
{/* Budget */}
{/* Timeline */}
{/* Description */}