t3-code-android-nightly/.repos/alchemy-effect/examples/neon-website-nextjs/app/actions.ts
Julius Marminge 6f9cea00ae
chore(refs): sync Effect and Alchemy references to 4.0.1 and beta.80 (#16170)
Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-05 13:22:30 -07:00

9 lines
290 B
TypeScript

"use server";
import { redirect } from "next/navigation";
export async function submitName(form: FormData) {
const value = form.get("name");
const name = typeof value === "string" ? value.trim().slice(0, 64) : "";
redirect(`/?submitted=${encodeURIComponent(name || "visitor")}`);
}