import { prisma } from "@repo/db";
import { Form } from "../_components/Form";

export default async function Page({ params }: { params: Promise<{ id: string }> }) {
	const { id } = await params;
	const event = await prisma.event.findUnique({
		where: {
			id: parseInt(id),
		},
	});
	if (!event) return <div>Event not found</div>;
	return <Form event={event} />;
}
