Skip to content

Commit

Permalink
Fixed portal scoreboard styling
Browse files Browse the repository at this point in the history
  • Loading branch information
itamaroryan committed Feb 5, 2025
1 parent f6a357d commit 9cd120c
Showing 1 changed file with 10 additions and 12 deletions.
22 changes: 10 additions & 12 deletions apps/portal/components/scoreboard-grid.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,15 @@ const ScoreboardGrid: React.FC<ScoreboardGridProps> = ({ data }) => {
const sortedTeamData = teamData.sort((a, b) => compareScoreArrays(a.scores, b.scores));

const columns: GridColDef<(typeof data)[number]>[] = [
{
field: 'rank',
headerName: 'מקום',
width: isDesktop ? 75 : 50,
sortable: true,
valueGetter: (_, row) => {
return sortedTeamData?.findIndex(teamData => teamData.team.number === row.team.number) + 1;
}
},
{
field: 'teamName',
headerName: 'קבוצה',
Expand All @@ -41,20 +50,8 @@ const ScoreboardGrid: React.FC<ScoreboardGridProps> = ({ data }) => {
return `#${row.team.number}`;
}
},
{
field: 'rank',
type: 'number',
headerName: 'מקום',
width: isDesktop ? 150 : 100,
sortable: true,
sortComparator: scoreComparator,
valueGetter: (_, row) => {
return sortedTeamData?.findIndex(teamData => teamData.team.number === row.team.number) + 1;
}
},
{
field: 'maxScore',
type: 'number',
headerName: 'ניקוד',
width: isDesktop ? 150 : 100,
sortable: true,
Expand Down Expand Up @@ -97,6 +94,7 @@ const ScoreboardGrid: React.FC<ScoreboardGridProps> = ({ data }) => {
}
}
}}
sx={{ textAlign: 'left' }}
disableColumnMenu
/>
</ThemeProvider>
Expand Down

0 comments on commit 9cd120c

Please sign in to comment.