fix: Ticker + Scoreboard empty in offseason / past-season leagues#67
Open
brandonpham13 wants to merge 10 commits intomainfrom
Open
fix: Ticker + Scoreboard empty in offseason / past-season leagues#67brandonpham13 wants to merge 10 commits intomainfrom
brandonpham13 wants to merge 10 commits intomainfrom
Conversation
Each newspaper-style dashboard section now lives in its own file under
widgets/dashboard/, with shared helpers (Eyebrow, SectionHead, SortHeader,
MatchupResult, teamName, teamAvatar, ordinal) consolidated in _shared.tsx.
DashboardPage becomes a thin orchestrator that fetches data and composes
widgets.
Also drops the dead widgets/registry.ts + /widgets/{LeagueStandings,
PowerRankings,RecentScoreboard}/ tree — nothing imported from it after
the dashboard rewrite.
No behavior or visual changes intended.
The dashboard was using the live NFL state's current week to query useLeagueMatchups for the selected league. In May 2026 with a 2025 league selected, that resolves to "preseason 2026 week 1" — Sleeper returns empty/stale data, so Ticker and Scoreboard render blank. Scope the display week to the selected league: - Current real-time week only when selectedLeague.season matches the live NFL season AND nflState.season_type === "regular". - Otherwise default to 17 (regular-season finale), so finished leagues and current-season offseason both surface the most recent meaningful matchup data. Also scopes nextWeek (no preview for past seasons) and uses the league's own season for usePlayerStats so Top Performers stays consistent.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
…randonpham13/huddle into feat/widgetize-dashboard-light
When the user switched seasons, useLeagueMatchups and useLeagueRosters re-fetched independently for the new leagueId. If matchups arrived before rosters repopulated, Scoreboard's rosters.find(...)! returned undefined, the subsequent teamName(undefined, users) threw, and the whole dashboard crashed to a white page (no error boundary). Drop the non-null assertions in Scoreboard and TopPerformers; skip pairs / rows where the roster lookup hasn't resolved yet. Once rosters populate the next render fills them in.
…randonpham13/huddle into feat/widgetize-dashboard-light
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The dashboard was always querying
useLeagueMatchups(selectedLeagueId, week)withweekderived from the live NFL state. Right now (May 2026, NFL preseason) that resolves to "preseason 2026 week 1" — Sleeper returns empty/stale data for any selected league, so Ticker and Scoreboard render blank.Fix
Scope the display week to the selected league's season:
selectedLeague.season === nflState.seasonANDnflState.season_type === "regular"(i.e. the selected league is the active current-season league).Also tightens two follow-on derivations so they stay consistent with the new
week:nextWeekonly advances when the league is current; otherwise stays equal toweek(soMyTeamSection's "Next · Week N Preview" doesn't try to query a non-existent week 18 for finished leagues — the existingSchedule TBDfallback already handles the empty case).seasonforusePlayerStatsnow prefersselectedLeague.seasonovernflState.season, so Top Performers shows stats from the league's own season instead of the live (likely empty) preseason window.Test plan
🤖 Generated with Claude Code