Skip to content

Commit 7f65d1c

Browse files
committed
Dropdown, csv Export, Podium fixes
1 parent 9f2b2a9 commit 7f65d1c

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/pages/leaderboard/subcomponents/LeaderboardDropdown.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ const LeaderboardDropdown: React.FC<Props> = ({ contests }) => {
2929

3030
const currentPath = location.pathname;
3131
const publishedContests = enableContestLeaderboard
32-
? contests.filter(contest => contest.published && !contest.voting)
32+
? contests.filter(contest => contest.published)
3333
: [];
3434

3535
return (

src/pages/leaderboard/subcomponents/LeaderboardExportButton.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ type Props =
1313
const LeaderboardExportButton: React.FC<Props> = ({ type, data }) => {
1414
const role = useTypedSelector(store => store.session.role);
1515
const exportCSV = () => {
16-
const headers = ['Rank', 'Name', 'Username', 'XP', 'Achievements'];
16+
const headers = ['Rank', 'Name', 'Username', (type == "overall" ? 'XP' : 'Score'), (type == "overall" ? 'Achievements' : 'Submission Id')];
1717
const rows = data?.map(player => [
1818
player.rank,
1919
player.name,

src/pages/leaderboard/subcomponents/LeaderboardPodium.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ const LeaderboardPodium: React.FC<Props> = ({ type, data, outputType }) => {
2525
<p className="player-name">{player.name}</p>
2626
<div className="player-bar">
2727
<p className="player-rank">{player.rank}</p>
28-
<p className="player-xp">{type == "overall" ? (player as LeaderboardRow).xp : (player as ContestLeaderboardRow).score} XP</p>
28+
<p className="player-xp">{type === "overall" ? (player as LeaderboardRow).xp : (player as ContestLeaderboardRow).score.toFixed(2)}{type === "overall" ? ' XP' : ''}</p>
2929
</div>
3030
</div>
3131
))}

0 commit comments

Comments
 (0)