hide leaderboard pp on unranked maps
Some checks failed
Deploy Backend / docker (ubuntu-latest) (push) Successful in 42s
Deploy Website / docker (ubuntu-latest) (push) Has been cancelled

This commit is contained in:
Lee 2024-10-20 19:24:31 +01:00
parent 336518ff70
commit d1a9654e33
7 changed files with 23 additions and 7 deletions

View File

@ -128,7 +128,7 @@ export class ImageService {
{/* Player PP */}
<div tw="flex justify-center items-center text-[33px]">
<p tw="text-[#606fff] m-0">{formatPp(player.pp)}pp</p>
<p tw="text-[#4858ff] m-0">{formatPp(player.pp)}pp</p>
{this.renderDailyChange(ppChange)}
</div>

View File

@ -54,7 +54,7 @@ export default function LeaderboardScore({ score, claimedPlayer }: Props) {
</td>
{/* Score PP */}
<td className="px-4 py-2 text-center text-pp whitespace-nowrap">{formatPp(score.pp)}pp</td>
{score.pp > 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

@ -179,7 +179,7 @@ export default function LeaderboardScores({
<th className="px-2 py-1 text-center">Score</th>
<th className="px-2 py-1 text-center">Accuracy</th>
<th className="px-2 py-1 text-center">Misses</th>
<th className="px-2 py-1 text-center">PP</th>
{leaderboard.stars > 0 && <th className="px-2 py-1 text-center">PP</th>}
<th className="px-2 py-1 text-center">Mods</th>
</tr>
</thead>

View File

@ -15,7 +15,7 @@ const datasetConfig: DatasetConfig[] = [
{
title: "Average Ranked Accuracy",
field: "accuracy.averageRankedAccuracy",
color: "#606fff",
color: "#4858ff",
axisId: "y",
axisConfig: {
reverse: false,

View File

@ -41,7 +41,7 @@ const datasetConfig: DatasetConfig[] = [
{
title: "PP",
field: "pp",
color: "#606fff",
color: "#4858ff",
axisId: "y2",
axisConfig: {
reverse: false,

View File

@ -3,11 +3,27 @@ import Tooltip from "@/components/tooltip";
import { formatNumberWithCommas } from "@ssr/common/utils/number-utils";
import { PlayerStatValue } from "@ssr/common/player/player-stat";
// Props for DailyChangeComponent
interface DailyChangeProps {
/**
* The type of change
*/
type: PlayerStatValue;
/**
* The value of the change
*/
change: number | undefined;
/**
* The tooltip to display
*/
tooltip?: React.ReactElement | string;
/**
* The formater for the change
*
* @param value
*/
format?: (value: number) => string;
}

View File

@ -10,7 +10,7 @@ const config: Config = {
theme: {
extend: {
colors: {
pp: "#606fff",
pp: "#4858ff",
background: "hsl(var(--background))",
foreground: "hsl(var(--foreground))",
card: {