"use client"; import Spinner from "@/components/Spinner"; import { motion } from "motion/react"; import Form from "next/form"; import { useActionState } from "react"; import logFormData from "./actions"; // Debug states for testing UI without sending email const debugSuccess = { message: "Sucessfully submitted your consultation request - expect to hear back soon via email!", error: false, }; const debugError = { message: "Failed to send email. This has been reported. Please try again later, and sorry for any inconvenience.", error: true, }; const initialState = { message: "", error: false, }; export default function Home() { // TODO: look up webdevsimplified video on forms in nextjs const [state, formAction, pending] = useActionState( logFormData, initialState ); return (
); }