pass through the leaderboard
All checks were successful
Deploy Website / docker (ubuntu-latest) (push) Successful in 2m12s

This commit is contained in:
Lee 2024-10-20 19:25:32 +01:00
parent d1a9654e33
commit cd2f8c0925
2 changed files with 11 additions and 3 deletions

View File

@ -6,6 +6,7 @@ import { clsx } from "clsx";
import Tooltip from "@/components/tooltip";
import { ScoreTimeSet } from "@/components/score/score-time-set";
import { ScoreModifiers } from "@/components/score/score-modifiers";
import ScoreSaberLeaderboard from "@ssr/common/leaderboard/impl/scoresaber-leaderboard";
type Props = {
/**
@ -13,13 +14,18 @@ type Props = {
*/
score: ScoreSaberScore;
/**
* The leaderboard for the score.
*/
leaderboard: ScoreSaberLeaderboard;
/**
* The claimed player.
*/
claimedPlayer?: ScoreSaberPlayerToken;
};
export default function LeaderboardScore({ score, claimedPlayer }: Props) {
export default function LeaderboardScore({ score, leaderboard, claimedPlayer }: Props) {
const scorePlayer = score.playerInfo;
return (
@ -54,7 +60,9 @@ export default function LeaderboardScore({ score, claimedPlayer }: Props) {
</td>
{/* Score PP */}
{score.pp > 0 && <td className="px-4 py-2 text-center text-pp whitespace-nowrap">{formatPp(score.pp)}pp</td>}
{leaderboard.stars > 0 && (
<td className="px-4 py-2 text-center text-pp whitespace-nowrap">{formatPp(score.pp)}pp</td>
)}
{/* Score Modifiers */}
<td className="px-4 py-2 text-center whitespace-nowrap">

View File

@ -186,7 +186,7 @@ export default function LeaderboardScores({
<motion.tbody initial="hidden" animate={controls} className="border-none" variants={scoreAnimation}>
{currentScores.scores.map((playerScore, index) => (
<motion.tr key={index} className="border-b border-border" variants={scoreAnimation}>
<LeaderboardScore score={playerScore} claimedPlayer={claimedPlayer} />
<LeaderboardScore score={playerScore} leaderboard={leaderboard} claimedPlayer={claimedPlayer} />
</motion.tr>
))}
</motion.tbody>