"use client"; import { useActionState } from "react"; import { submitContact, type ContactFormState } from "@/app/actions"; import { Send, CheckCircle2, AlertCircle } from "lucide-react"; const initial: ContactFormState = { ok: false, message: "" }; export function ContactForm() { const [state, formAction, pending] = useActionState(submitContact, initial); return (
); } function Field({ label, name, type = "text", placeholder, error, required, }: { label: string; name: string; type?: string; placeholder?: string; error?: string; required?: boolean; }) { return ({error}
}