From fad22274fd5113f9d70dbe25e9bd5f221bb64a21 Mon Sep 17 00:00:00 2001 From: Liam Date: Mon, 21 Oct 2024 06:56:20 +0100 Subject: [PATCH] make song name clickable on leaderboard page (goes to beatsaver map) --- .../components/leaderboard/leaderboard-info.tsx | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/projects/website/src/components/leaderboard/leaderboard-info.tsx b/projects/website/src/components/leaderboard/leaderboard-info.tsx index 1c64948..83b770a 100644 --- a/projects/website/src/components/leaderboard/leaderboard-info.tsx +++ b/projects/website/src/components/leaderboard/leaderboard-info.tsx @@ -6,6 +6,7 @@ import ScoreSaberLeaderboard from "@ssr/common/leaderboard/impl/scoresaber-leade import { BeatSaverMap } from "@ssr/common/model/beatsaver/beatsaver-map"; import { getBeatSaverMapperProfileUrl } from "@ssr/common/utils/beatsaver.util"; import FallbackLink from "@/components/fallback-link"; +import { formatNumber } from "@ssr/common/utils/number-utils"; type LeaderboardInfoProps = { /** @@ -26,9 +27,14 @@ export function LeaderboardInfo({ leaderboard, beatSaverMap }: LeaderboardInfoPr
{/* Song Info */}
-

- {leaderboard.songName} {leaderboard.songSubName} -

+ +

+ {leaderboard.songName} {leaderboard.songSubName} +

+

By {leaderboard.songAuthorName}

@@ -45,7 +51,8 @@ export function LeaderboardInfo({ leaderboard, beatSaverMap }: LeaderboardInfoPr

- Plays: {leaderboard.plays} ({leaderboard.dailyPlays} today) + Plays: {formatNumber(leaderboard.plays)} ( + {formatNumber(leaderboard.dailyPlays)} today)

Status: {leaderboard.stars > 0 ? "Ranked" : "Unranked"}