'use client'; import React from 'react'; import { Medal, Users, Globe, Languages } from 'lucide-react'; import { Box } from '@/ui/Box'; import { Stack } from '@/ui/Stack'; import { Text } from '@/ui/Text'; import { Image } from '@/ui/Image'; import { Icon } from '@/ui/Icon'; import { Surface } from '@/ui/Surface'; import { getMediaUrl } from '@/lib/utilities/media'; interface Team { id: string; name: string; logoUrl?: string; performanceLevel: string; category?: string; region?: string; languages?: string[]; isRecruiting?: boolean; memberCount: number; totalWins: number; totalRaces: number; } interface TeamRankingsTableProps { teams: Team[]; sortBy: string; onTeamClick: (id: string) => void; } export function TeamRankingsTable({ teams, sortBy, onTeamClick }: TeamRankingsTableProps) { return ( {/* Table Header */} Rank Team Members Rating Wins {/* Table Body */} {teams.map((team, index) => { const winRate = team.totalRaces > 0 ? ((team.totalWins / team.totalRaces) * 100).toFixed(1) : '0.0'; return ( onTeamClick(team.id)} style={{ display: 'grid', gridTemplateColumns: 'repeat(12, minmax(0, 1fr))', gap: '1rem', padding: '1rem', width: '100%', textAlign: 'left', backgroundColor: 'transparent', border: 'none', cursor: 'pointer', borderBottom: index < teams.length - 1 ? '1px solid rgba(38, 38, 38, 0.5)' : 'none' }} > {/* Position */} {index < 3 ? : index + 1} {/* Team Info */} {team.name} {team.name} {team.performanceLevel} {team.category && ( {team.category} )} {/* Members */} {team.memberCount} {/* Rating */} 0 {/* Wins */} {team.totalWins} ); })} ); }