/** * Type and initial value for the waitlist form state. * * Separate from waitlist.ts on purpose: a "use server" module may only * export async functions, so the constant cannot live next to the action * it belongs to. */ export type WaitlistState = { status: "idle" | "success" | "error"; message?: string; /** Echoed back so a rejected submission does not clear the field. */ email?: string; }; export const initialWaitlistState: WaitlistState = { status: "idle" };