import Form from 'next/form' import { auth } from '@clerk/nextjs/server'; import { prisma } from "@/lib/prisma"; import { revalidatePath } from "next/cache"; import { redirect } from "next/navigation"; export default async function Page() { async function createPost(formData: FormData) { "use server"; const { userId } = await auth(); // if (!userId) { throw new Error("You must be logged in to post!"); } const first_name = formData.get("fname") as string; const last_name = formData.get("lname") as string; const post_text = formData.get("post-text") as string; const pet_species = formData.get("pet_species") as string; console.log(first_name, last_name, post_text, pet_species); await prisma.post.create({ data: { content: post_text, petId: 3, }, }); revalidatePath("/"); redirect("/"); } return <>

This is create post content