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