Files
football-next/app/(admin)/admin/matches/[id]/edit/page.tsx
a.alinaghipour aa9ed69dd2 first commit
2026-04-05 15:53:20 +03:30

21 lines
685 B
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import { db } from "@/lib/db";
import { notFound } from "next/navigation";
import MatchForm from "../../MatchForm";
export default async function EditMatchPage({ params }: { params: { id: string } }) {
const [match, countries, rounds] = await Promise.all([
db.match.findUnique({ where: { id: params.id } }),
db.country.findMany({ orderBy: { name: "asc" } }),
db.round.findMany({ orderBy: { number: "asc" } }),
]);
if (!match) notFound();
return (
<div className="max-w-xl">
<h1 className="text-2xl font-bold mb-6">ویرایش بازی</h1>
<MatchForm countries={countries} rounds={rounds} matchId={match.id} initial={match} />
</div>
);
}