fix(ssr): fix showing star count on unranked leaderboards
All checks were successful
deploy / deploy (push) Successful in 1m31s
All checks were successful
deploy / deploy (push) Successful in 1m31s
This commit is contained in:
parent
b60d713d3c
commit
0ffb3e341d
@ -115,11 +115,13 @@ export default function Leaderboard({ id, page }: LeaderboardProps) {
|
||||
</div>
|
||||
<div className="flex flex-col gap-1">
|
||||
<p>Status: {ranked ? "Ranked" : "Unranked"}</p>
|
||||
<div className="flex">
|
||||
<p>Stars:</p>
|
||||
<StarIcon width={20} height={20} className="ml-1" />
|
||||
<p className="text-pp-blue">{stars}</p>
|
||||
</div>
|
||||
{ranked && (
|
||||
<div className="flex">
|
||||
<p>Stars:</p>
|
||||
<StarIcon width={20} height={20} className="ml-1" />
|
||||
<p className="text-pp-blue">{stars}</p>
|
||||
</div>
|
||||
)}
|
||||
<p>
|
||||
Plays: {formatNumber(plays)} ({dailyPlays} in the last day)
|
||||
</p>
|
||||
|
@ -125,6 +125,15 @@ async function fetchScores(
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the players scores with beatsaver data from the given page
|
||||
*
|
||||
* @param playerId the id of the player
|
||||
* @param page the page to get the scores from
|
||||
* @param searchType the type of search to perform
|
||||
* @param limit the limit of scores to get
|
||||
* @returns the scores with beatsaver data
|
||||
*/
|
||||
async function fetchScoresWithBeatsaverData(
|
||||
playerId: string,
|
||||
page: number = 1,
|
||||
|
Loading…
Reference in New Issue
Block a user