'use client'; import { Card } from '@/ui/Card'; import { useTeamStandings } from "@/lib/hooks/team"; import { Stack } from '@/ui/Stack'; import { Box } from '@/ui/Box'; import { Text } from '@/ui/Text'; import { Heading } from '@/ui/Heading'; import { Badge } from '@/ui/Badge'; import { Grid } from '@/ui/Grid'; import { Surface } from '@/ui/Surface'; interface TeamStandingsProps { teamId: string; leagues: string[]; } export function TeamStandings({ teamId, leagues }: TeamStandingsProps) { const { data: standings = [], isLoading: loading } = useTeamStandings(teamId, leagues); if (loading) { return ( Loading standings... ); } return ( League Standings {standings.map((standing: any) => ( {standing.leagueName} P{standing.position} {standing.points} Points {standing.wins} Wins {standing.racesCompleted} Races ))} {standings.length === 0 && ( No standings available yet. )} ); }