Skip to content

Commit

Permalink
Merge pull request #263 from bruin-tennis-consulting/262_setscores
Browse files Browse the repository at this point in the history
Fixed usage of MatchData.sets for Tiles
  • Loading branch information
Fredenck authored Jan 13, 2025
2 parents 95f29f2 + 78d1060 commit 322de9a
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions app/matches/[slug]/page.js
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,7 @@ const MatchPage = () => {
}

// Usage in your component:
console.log(matchData)
const matchScores = matchData ? getMatchScores(matchData.pointsJson) : []

return (
Expand All @@ -203,11 +204,11 @@ const MatchPage = () => {
' ' +
matchData.players.opponent.lastName
}
player1FinalScores={matchScores.map((scores) => ({
score: scores[0]
player1FinalScores={matchData.sets.map((set) => ({
score: set.clientGames
}))}
player2FinalScores={matchScores.map((scores) => ({
score: scores[1]
player2FinalScores={matchData.sets.map((set) => ({
score: set.opponentGames
}))}
player1TieScores={matchData.pointsJson.map(
(point) => point.player1TiebreakScore
Expand Down

0 comments on commit 322de9a

Please sign in to comment.