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

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