1
mirror of https://github.com/jakejarvis/jarv.is.git synced 2025-11-14 22:00:50 -05:00

consistent arrow functions

This commit is contained in:
2025-03-12 18:10:11 -04:00
parent 6a57fde2f1
commit e61ca889a7
39 changed files with 121 additions and 126 deletions

View File

@@ -3,7 +3,7 @@
import { headers } from "next/headers";
import { z } from "zod";
import { Resend } from "resend";
import config from "../../lib/config/constants";
import config from "../../lib/config";
const schema = z.object({
name: z.string().min(1, { message: "Name is required" }),
@@ -12,7 +12,7 @@ const schema = z.object({
["cf-turnstile-response"]: z.string().min(1, { message: "CAPTCHA not completed" }),
});
export async function sendMessage(
export const sendMessage = async (
// eslint-disable-next-line @typescript-eslint/no-explicit-any
prevState: any,
formData: FormData
@@ -21,7 +21,7 @@ export async function sendMessage(
message: string;
errors?: z.inferFormattedError<typeof schema>;
payload?: FormData;
}> {
}> => {
try {
const validatedFields = schema.safeParse(Object.fromEntries(formData));
@@ -85,4 +85,4 @@ export async function sendMessage(
payload: formData,
};
}
}
};