pass through the leaderboard
All checks were successful
Deploy Website / docker (ubuntu-latest) (push) Successful in 2m12s
All checks were successful
Deploy Website / docker (ubuntu-latest) (push) Successful in 2m12s
This commit is contained in:
parent
d1a9654e33
commit
cd2f8c0925
@ -6,6 +6,7 @@ import { clsx } from "clsx";
|
|||||||
import Tooltip from "@/components/tooltip";
|
import Tooltip from "@/components/tooltip";
|
||||||
import { ScoreTimeSet } from "@/components/score/score-time-set";
|
import { ScoreTimeSet } from "@/components/score/score-time-set";
|
||||||
import { ScoreModifiers } from "@/components/score/score-modifiers";
|
import { ScoreModifiers } from "@/components/score/score-modifiers";
|
||||||
|
import ScoreSaberLeaderboard from "@ssr/common/leaderboard/impl/scoresaber-leaderboard";
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
/**
|
/**
|
||||||
@ -13,13 +14,18 @@ type Props = {
|
|||||||
*/
|
*/
|
||||||
score: ScoreSaberScore;
|
score: ScoreSaberScore;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* The leaderboard for the score.
|
||||||
|
*/
|
||||||
|
leaderboard: ScoreSaberLeaderboard;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The claimed player.
|
* The claimed player.
|
||||||
*/
|
*/
|
||||||
claimedPlayer?: ScoreSaberPlayerToken;
|
claimedPlayer?: ScoreSaberPlayerToken;
|
||||||
};
|
};
|
||||||
|
|
||||||
export default function LeaderboardScore({ score, claimedPlayer }: Props) {
|
export default function LeaderboardScore({ score, leaderboard, claimedPlayer }: Props) {
|
||||||
const scorePlayer = score.playerInfo;
|
const scorePlayer = score.playerInfo;
|
||||||
|
|
||||||
return (
|
return (
|
||||||
@ -54,7 +60,9 @@ export default function LeaderboardScore({ score, claimedPlayer }: Props) {
|
|||||||
</td>
|
</td>
|
||||||
|
|
||||||
{/* Score PP */}
|
{/* 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 */}
|
{/* Score Modifiers */}
|
||||||
<td className="px-4 py-2 text-center whitespace-nowrap">
|
<td className="px-4 py-2 text-center whitespace-nowrap">
|
||||||
|
@ -186,7 +186,7 @@ export default function LeaderboardScores({
|
|||||||
<motion.tbody initial="hidden" animate={controls} className="border-none" variants={scoreAnimation}>
|
<motion.tbody initial="hidden" animate={controls} className="border-none" variants={scoreAnimation}>
|
||||||
{currentScores.scores.map((playerScore, index) => (
|
{currentScores.scores.map((playerScore, index) => (
|
||||||
<motion.tr key={index} className="border-b border-border" variants={scoreAnimation}>
|
<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.tr>
|
||||||
))}
|
))}
|
||||||
</motion.tbody>
|
</motion.tbody>
|
||||||
|
Reference in New Issue
Block a user