import { db } from "@/lib/db"; import { notFound } from "next/navigation"; import Link from "next/link"; import MatchEventManager from "./MatchEventManager"; import MatchLineupManager from "./MatchLineupManager"; export default async function MatchDetailPage({ params }: { params: Promise<{ id: string; matchId: string }> }) { const { id, matchId } = await params; const match = await db.match.findUnique({ where: { id: matchId }, include: { homeTeam: { include: { players: { where: { isActive: true }, orderBy: { position: "asc" } } } }, awayTeam: { include: { players: { where: { isActive: true }, orderBy: { position: "asc" } } } }, events: { include: { player: true }, orderBy: { minute: "asc" } }, lineups: true, playerStats: { include: { player: true } }, }, }); if (!match) notFound(); return (
← دور

{match.homeTeam.name} {match.homeScore ?? "-"} - {match.awayScore ?? "-"} {match.awayTeam.name}

{/* مدیریت ترکیب */} {/* مدیریت رویدادها */}
); }