brackt/app/types/standings.ts
Claude 5fd9c6410b
Show team name + username in standings, extract TeamNameDisplay component
- Add TeamNameDisplay component that renders team name (as link) with owner username below, matching the league homepage style
- Update StandingsTable to use TeamNameDisplay with owner username shown below team name
- Update league homepage standings section to use TeamNameDisplay
- Add ownerName/teamOwnerId fields to TeamStanding type
- Extend getSeasonStandings to include teamOwnerId from team relation
- Fetch and attach owner display names in the full standings page loader

https://claude.ai/code/session_01EYgGnuTBaRVdBDapJRTxDZ
2026-03-20 03:11:34 +00:00

36 lines
848 B
TypeScript

/**
* Shared types for standings that can be used in both server and client code
*/
export interface TeamStanding {
teamId: string;
teamName: string;
teamOwnerId?: string | null;
ownerName?: string | null;
totalPoints: number;
currentRank: number;
previousRank: number | null;
rankChange: number; // Positive = moved up, negative = moved down
placementCounts: {
first: number;
second: number;
third: number;
fourth: number;
fifth: number;
sixth: number;
seventh: number;
eighth: number;
};
participantsRemaining: number;
calculatedAt: Date;
// Phase 5.4: Expected value projections
actualPoints?: number | null;
projectedPoints?: number | null;
participantsFinished?: number | null;
}
export interface TeamStandingSnapshot {
date: Date;
rank: number;
totalPoints: number;
}