feat: Enhance UI for live scores and standings, refactor data types f…#4
feat: Enhance UI for live scores and standings, refactor data types f…#4gishanchamith wants to merge 1 commit intomainfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting
| <div className="w-10 h-10 rounded-full bg-primary/20 flex items-center justify-center"> | ||
| <span className="text-sm font-bold text-primary">{match.team1?.shortCode || 'T1'}</span> | ||
| </div> |
There was a problem hiding this comment.
[P1] Extend TeamInfo to cover short codes
The new Matches typings only give a team name, yet the live score card renders match.team1?.shortCode as part of the UI. With the stricter typing introduced in this commit, running npx tsc --noEmit fails (TS2339: Property 'shortCode' does not exist on type 'TeamInfo'). Either add an optional shortCode field to TeamInfo or stop referencing it so type checking doesn’t break.
Useful? React with 👍 / 👎.
| <h4 className="font-semibold text-sm">{match.currentOver?.number || 6}th over</h4> | ||
| <div className="flex justify-center gap-1"> | ||
| {match.currentOver?.balls?.map((ball, index) => ( |
There was a problem hiding this comment.
[P1] Match type missing current over data
The UI now reads match.currentOver?.number and iterates over match.currentOver?.balls, but the newly added Match interface in lib/types.ts doesn’t define a currentOver field. This causes npx tsc --noEmit to fail with TS2339 and makes the types unusable for editor assistance. Consider extending the Match type (e.g. currentOver?: { number: number; balls: string[] }) or guarding the UI with any casting.
Useful? React with 👍 / 👎.
…or matches