Skip to content

Commit

Permalink
feat: added titles to columns in leaderboard
Browse files Browse the repository at this point in the history
  • Loading branch information
itzRaghav14 committed Dec 24, 2023
1 parent 5cb12f2 commit c184626
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions src/components/Ratings/LeaderBoard.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,46 +24,49 @@ const columns = [
name: "Rank",
key: "rank",
sort: 0,
align: "center",
align: "center"
},
{
name: "Who",
key: "who",
sort: 0,
align: "left",
align: "left"
},
{
name: "#",
key: "count",
sort: 0,
align: "center",
desc: 'number of contests participated'
},
{
name: "Previous Rank",
key: "prevRank",
sort: 1,
sortkey: 0,
align: "center",
align: "center"
},
{
name: "Δ",
key: "delta",
sort: 1,
sortkey: 1,
align: "center",
desc: 'rating change'
},
{
name: "=",
key: "rating",
sort: 1,
sortkey: 2,
align: "center",
desc: 'current rating'
},
{
name: null,
key: "change",
sort: 0,
align: "center",
align: "center"
}
];

Expand Down Expand Up @@ -209,7 +212,12 @@ function LeaderBoard({ arrangedData }) {
{columns.map((column, i) => {
return (
<TableCell align={column.align} key={i}>
<Typography sx={{ fontWeight: "700", fontSize: "1.1em" }}>{column.name}</Typography>
<Typography
sx={{ fontWeight: "700", fontSize: "1.1em" }}
title={column.desc}
>
{column.name}
</Typography>
</TableCell>
);
})}
Expand Down

0 comments on commit c184626

Please sign in to comment.