From a1148d0f59af4e9ce053066e9708ad3d8f98b717 Mon Sep 17 00:00:00 2001 From: Liam Date: Sat, 19 Oct 2024 15:31:02 +0100 Subject: [PATCH] cleanup --- .../website/src/components/leaderboard/leaderboard-score.tsx | 4 ++-- .../components/{table-player.tsx => player/player-info.tsx} | 2 +- projects/website/src/components/ranking/mini.tsx | 5 ++--- projects/website/src/components/ranking/player-ranking.tsx | 4 ++-- 4 files changed, 7 insertions(+), 8 deletions(-) rename projects/website/src/components/{table-player.tsx => player/player-info.tsx} (93%) diff --git a/projects/website/src/components/leaderboard/leaderboard-score.tsx b/projects/website/src/components/leaderboard/leaderboard-score.tsx index 8b344a2..ad37a11 100644 --- a/projects/website/src/components/leaderboard/leaderboard-score.tsx +++ b/projects/website/src/components/leaderboard/leaderboard-score.tsx @@ -2,7 +2,7 @@ import ScoreSaberScore from "@ssr/common/score/impl/scoresaber-score"; import { formatNumberWithCommas, formatPp } from "@ssr/common/utils/number-utils"; import { timeAgo } from "@ssr/common/utils/time-utils"; import ScoreSaberPlayerToken from "@ssr/common/types/token/scoresaber/score-saber-player-token"; -import { TablePlayer } from "@/components/table-player"; +import { PlayerInfo } from "@/components/player/player-info"; type Props = { /** @@ -26,7 +26,7 @@ export default function LeaderboardScore({ score, claimedPlayer }: Props) { {/* Player */} - + {/* Time Set */} diff --git a/projects/website/src/components/table-player.tsx b/projects/website/src/components/player/player-info.tsx similarity index 93% rename from projects/website/src/components/table-player.tsx rename to projects/website/src/components/player/player-info.tsx index 6f70c9b..79a1de0 100644 --- a/projects/website/src/components/table-player.tsx +++ b/projects/website/src/components/player/player-info.tsx @@ -22,7 +22,7 @@ type TablePlayerProps = { hideCountryFlag?: boolean; }; -export function TablePlayer({ player, claimedPlayer, hideCountryFlag }: TablePlayerProps) { +export function PlayerInfo({ player, claimedPlayer, hideCountryFlag }: TablePlayerProps) { return ( <> diff --git a/projects/website/src/components/ranking/mini.tsx b/projects/website/src/components/ranking/mini.tsx index 150ea47..b442446 100644 --- a/projects/website/src/components/ranking/mini.tsx +++ b/projects/website/src/components/ranking/mini.tsx @@ -5,12 +5,11 @@ import Link from "next/link"; import { ReactElement } from "react"; import Card from "../card"; import CountryFlag from "../country-flag"; -import { Avatar, AvatarImage } from "../ui/avatar"; import { PlayerRankingSkeleton } from "@/components/ranking/player-ranking-skeleton"; import ScoreSaberPlayer from "@ssr/common/player/impl/scoresaber-player"; import { getPlayersAroundPlayer } from "@ssr/common/utils/player-utils"; import { AroundPlayer } from "@ssr/common/types/around-player"; -import { TablePlayer } from "@/components/table-player"; +import { PlayerInfo } from "@/components/player/player-info"; import useDatabase from "@/hooks/use-database"; import { useLiveQuery } from "dexie-react-hooks"; @@ -102,7 +101,7 @@ export default function Mini({ type, player, shouldUpdate }: MiniProps) { >

#{formatNumberWithCommas(rank)}

- +

{formatPp(playerRanking.pp)}pp

diff --git a/projects/website/src/components/ranking/player-ranking.tsx b/projects/website/src/components/ranking/player-ranking.tsx index 2d20581..cd12a25 100644 --- a/projects/website/src/components/ranking/player-ranking.tsx +++ b/projects/website/src/components/ranking/player-ranking.tsx @@ -5,7 +5,7 @@ import ScoreSaberPlayerToken from "@ssr/common/types/token/scoresaber/score-sabe import useDatabase from "@/hooks/use-database"; import { useLiveQuery } from "dexie-react-hooks"; import { clsx } from "clsx"; -import { TablePlayer } from "@/components/table-player"; +import { PlayerInfo } from "@/components/player/player-info"; type PlayerRankingProps = { player: ScoreSaberPlayerToken; @@ -26,7 +26,7 @@ export function PlayerRanking({ player, isCountry }: PlayerRankingProps) { {isCountry && "(#" + formatNumberWithCommas(player.rank) + ")"} - + {formatPp(player.pp)}pp {formatNumberWithCommas(player.scoreStats.totalPlayCount)}