fix comments
All checks were successful
Deploy / deploy (push) Successful in 4m51s

This commit is contained in:
Lee 2024-10-01 09:40:02 +01:00
parent 73b039dca8
commit c79c5fa4f2
3 changed files with 18 additions and 6 deletions

@ -5,9 +5,9 @@ import Link from "next/link";
type Props = {
/**
* The claimed player.
* The player who set the score.
*/
player: ScoreSaberPlayer;
player?: ScoreSaberPlayer;
/**
* The score to display.
@ -17,6 +17,7 @@ type Props = {
export default function LeaderboardPlayer({ player, score }: Props) {
const scorePlayer = score.leaderboardPlayerInfo;
const isPlayerWhoSetScore = player && scorePlayer.id === player.id;
return (
<div className="flex gap-2">
@ -34,7 +35,7 @@ export default function LeaderboardPlayer({ player, score }: Props) {
target="_blank"
className="h-fit hover:brightness-75 transition-all transform-gpu"
>
<p className={`${scorePlayer.id === player.id && "text-pp"}`}>{scorePlayer.name}</p>
<p className={`${isPlayerWhoSetScore && "text-pp"}`}>{scorePlayer.name}</p>
</Link>
</div>
);

@ -9,9 +9,9 @@ import ScoreSaberPlayer from "@/common/model/player/impl/scoresaber-player";
type Props = {
/**
* The claimed player.
* The player who set the score.
*/
player: ScoreSaberPlayer;
player?: ScoreSaberPlayer;
/**
* The score to display.

@ -14,8 +14,19 @@ import { scoreAnimation } from "@/components/score/score-animation";
import ScoreSaberPlayer from "@/common/model/player/impl/scoresaber-player";
type LeaderboardScoresProps = {
/**
* The page to show when opening the leaderboard.
*/
initialPage?: number;
player: ScoreSaberPlayer;
/**
* The player who set the score.
*/
player?: ScoreSaberPlayer;
/**
* The leaderboard to display.
*/
leaderboard: ScoreSaberLeaderboardToken;
};