feat(predict): cp-7.62.0 adds PredictMarketSportCard#24601
Conversation
…sts (and removes redundant types)
app/components/UI/Predict/components/PredictMarketSportCard/PredictMarketSportCard.tsx
Outdated
Show resolved
Hide resolved
app/components/UI/Predict/components/PredictMarketSportCard/PredictMarketSportCard.tsx
Outdated
Show resolved
Hide resolved
app/components/UI/Predict/components/PredictSportScoreboard/PredictSportScoreboard.tsx
Outdated
Show resolved
Hide resolved
…tMarketSportCard and PredictSportScoreboard components
...omponents/UI/Predict/components/PredictGameDetailsContent/PredictGameDetailsContent.test.tsx
Show resolved
Hide resolved
|
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsThis PR contains changes exclusively within the Predict feature (prediction markets) in the app/components/UI/Predict/ directory. The changes include:
The changes are:
The SmokePredictions tag is the appropriate and only necessary tag since all changes are isolated to the predictions feature. No other features or core functionality are affected. |
| > | ||
| <PredictSportTeamGradient | ||
| awayColor={market.game?.awayTeam.color ?? '#1a2942'} | ||
| homeColor={market.game?.homeTeam.color ?? '#3d2621'} |
There was a problem hiding this comment.
Inconsistent fallback colors between gradient and scoreboard
Low Severity
The fallback colors used when market.game is undefined differ between PredictSportTeamGradient (lines 105-106: #1a2942 and #3d2621) and PredictSportScoreboard (lines 122, 126: #1D4E9B and #FC4C02). When game data is missing, the gradient background and team helmet colors will be visually mismatched, creating an inconsistent appearance.
Additional Locations (1)
|
|
Missing release label release-7.62.0 on PR. Adding release label release-7.62.0 on PR and removing other release labels(release-7.63.0), as PR was cherry-picked in branch 7.62.0. |



Description
This PR implements the sports market card component and refactors the scoreboard to derive UI state from API data for the Predict feature.
Key changes:
PredictMarketSportCard- New component displaying sports betting markets with team gradient backgrounds, integrated scoreboard, and dynamic team data (colors, abbreviations)PredictSportScoreboardrefactor - Updated to use centralized types (PredictGameStatus, PredictSportTeam) and derive possession/winner state from props:formatGameStartTime- New utility function for locale-aware date/time formatting of ISO 8601 stringsPredictSportScoreboard.types.tsin favor of centralized types intypes/index.tsPredictMarketSportCard,formatGameStartTime, and updated PredictSportScoreboard testsArchitecture improvement:
The scoreboard component now derives UI state (
possession,winner) internally from API data (turn,awayScore,homeScore) rather than requiring parent components to compute and pass these values. This reduces coupling and makes the component easier to use with real API responses.Changelog
CHANGELOG entry: null
Related issues
Fixes: PRED-482
Manual testing steps
Screenshots/Recordings
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist
Note
Implements a new sports market card and simplifies scoreboard integration by deriving UI state directly from API data.
PredictMarketSportCardshowing title, gradient,PredictSportScoreboard, conditional action buttons, and navigation; usesformatGameStartTimefor date/timePredictSportScoreboardto acceptgameStatus,period, andturn, deriving PreGame/InProgress/Halftime/Final, possession, and winner internally; removesPredictSportScoreboard.types.tsand re-exports props from implementationPredictGameDetailsContentto passgameStatus,period, andturn(removes local game state/possession/winner computations)formatGameStartTimeutility with tests; adds comprehensive tests for the new card and updated scoreboardWritten by Cursor Bugbot for commit 2e1d829. This will update automatically on new commits. Configure here.