import { db } from "@/lib/db"; import { notFound } from "next/navigation"; import PlayerForm from "../../PlayerForm"; import DeleteButton from "./DeleteButton"; export default async function EditPlayerPage({ params }: { params: Promise<{ id: string }> }) { const { id } = await params; const [player, countries] = await Promise.all([ db.player.findUnique({ where: { id } }), db.country.findMany({ orderBy: { name: "asc" } }), ]); if (!player) notFound(); return (