"use client"; import { useMemo, useState } from "react"; type IndustryOption = { value: string; label: string }; export default function RegistrationForm({ data, }: { data: { sections: { personal: { title: string; fullName: string; phone: string; email: string }; professional: { title: string; company: string; jobTitle: string }; industry: { title: string; label: string; placeholder: string; options: IndustryOption[] }; additional: { title: string; label: string; placeholder: string }; }; submit: { label: string; disclaimer: string }; }; }) { const industries = useMemo(() => data.sections.industry.options, [data.sections.industry.options]); const [form, setForm] = useState({ fullName: "", phone: "", email: "", company: "", jobTitle: "", industry: "", notes: "", }); return (
{ e.preventDefault(); // frontend-only scope console.log("[registration]", form); alert("Saved locally (frontend-only)."); }} >

{data.sections.personal.title}

setForm((s) => ({ ...s, fullName: e.target.value }))} />
setForm((s) => ({ ...s, phone: e.target.value }))} />
setForm((s) => ({ ...s, email: e.target.value }))} />

{data.sections.professional.title}

setForm((s) => ({ ...s, company: e.target.value }))} />
setForm((s) => ({ ...s, jobTitle: e.target.value }))} />

{data.sections.industry.title}

expand_more

{data.sections.additional.title}