admin
This commit is contained in:
@@ -3,9 +3,10 @@ import { notFound } from "next/navigation";
|
||||
import PlayerForm from "../../PlayerForm";
|
||||
import DeleteButton from "./DeleteButton";
|
||||
|
||||
export default async function EditPlayerPage({ params }: { params: { id: string } }) {
|
||||
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: params.id } }),
|
||||
db.player.findUnique({ where: { id } }),
|
||||
db.country.findMany({ orderBy: { name: "asc" } }),
|
||||
]);
|
||||
|
||||
@@ -25,6 +26,7 @@ export default async function EditPlayerPage({ params }: { params: { id: string
|
||||
position: player.position,
|
||||
countryId: player.countryId,
|
||||
price: player.price,
|
||||
image: player.image,
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user