Files
football-next/app/(admin)/admin/rounds/[id]/edit/page.tsx
2026-04-07 10:38:28 +03:30

24 lines
731 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 Link from "next/link";
import RoundForm from "../../RoundForm";
export default async function EditRoundPage({ params }: { params: Promise<{ id: string }> }) {
const { id } = await params;
const round = await db.round.findUnique({
where: { id },
});
if (!round) notFound();
return (
<div className="max-w-2xl mx-auto">
<div className="flex items-center gap-3 mb-6">
<Link href="/admin/rounds" className="text-gray-400 hover:text-gray-600"> بازگشت</Link>
<h1 className="text-2xl font-bold">ویرایش دور {round.number}</h1>
</div>
<RoundForm editRound={round} />
</div>
);
}