* Fix flex pick count using unique sports drafted, not total season sports The flex count was calculated as `totalPicks - totalSportsInSeason`, which always returned 0 when a team drafted multiple participants from the same sport (e.g. 2 picks from UEFA Champions League with 2 sports in season = 2 - 2 = 0). Now uses the number of unique sports the team has actually drafted from, so 2 picks in 1 sport correctly shows 1 flex used. https://claude.ai/code/session_01DZ6jqgZTDEmJucanBtRCtM * Code review fixes for TeamsDraftedGrid and draft route - Fix misleading early-return message: "No picks have been made yet" only fires when there are no sports configured, so update to say "No sports have been configured for this season." - Remove unused draftOrder and team.seasonId from TeamsDraftedGrid props - Replace availableParticipants prop with sports prop to eliminate duplicate sports derivation; route already computes seasonSportsData - Add alphabetical sort to seasonSportsData so ordering is consistent - Fix availableParticipants: any[] in loader — restructure to ternary so TypeScript infers the Drizzle select type directly - Remove any annotation from seasonSportsData forEach callback (now typed) - Fix teamSportPicks.indexOf(pick) O(n) re-scan — use map callback index i https://claude.ai/code/session_01DZ6jqgZTDEmJucanBtRCtM --------- Co-authored-by: Claude <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| __tests__ | ||
| $leagueId.draft-board.$seasonId.tsx | ||
| $leagueId.draft.$seasonId.tsx | ||
| $leagueId.server.ts | ||
| $leagueId.settings.tsx | ||
| $leagueId.sports-seasons.$sportsSeasonId.server.ts | ||
| $leagueId.sports-seasons.$sportsSeasonId.tsx | ||
| $leagueId.standings.$seasonId.teams.$teamId.tsx | ||
| $leagueId.standings.$seasonId.tsx | ||
| $leagueId.tsx | ||
| new.tsx | ||