import Link from "next/link"; import { notFound } from "next/navigation"; import { createClient } from "@/lib/supabase/server"; import { PageHeader } from "@/components/dashboard/page-header"; import { GlassCard } from "@/components/ui/glass-card"; import { Button } from "@/components/ui/button"; export default async function MasterLeagueDetailPage({ params, }: { params: Promise<{ leagueId: string }>; }) { const { leagueId } = await params; const supabase = await createClient(); const { data: league } = await supabase .from("leagues") .select("*, competitions(*)") .eq("id", leagueId) .single(); if (!league) notFound(); return (
Edit rules } />
    {league.competitions?.map( (c: { id: string; name: string; status: string; tournament_mode: string }) => (
  • {c.name} {c.tournament_mode} ยท {c.status}
  • ) )} {(!league.competitions || league.competitions.length === 0) && (

    No competitions yet

    )}
); }