import { ScoresaberLeaderboardInfo } from "@/schemas/scoresaber/leaderboard"; import { ScoresaberScore } from "@/schemas/scoresaber/score"; import { formatNumber } from "@/utils/number"; import { GlobeAsiaAustraliaIcon } from "@heroicons/react/20/solid"; import clsx from "clsx"; import moment from "moment"; import Image from "next/image"; import ScoreStatLabel from "./ScoreStatLabel"; type ScoreProps = { score: ScoresaberScore; leaderboard: ScoresaberLeaderboardInfo; }; export default function Score({ score, leaderboard }: ScoreProps) { const isFullCombo = score.missedNotes + score.badCuts === 0; return (

#{score.rank}

{moment(score.timeSet).fromNow()}

{/* Song Image */}
{leaderboard.songName} {/* Song Info */}

{leaderboard.songName}

{leaderboard.songAuthorName}{" "} {leaderboard.levelAuthorName}

{/* Score rank */}

#{score.rank}

{/* Time Set (Mobile) */}
{" "}

{moment(score.timeSet).fromNow()}

{/* PP */}
{score.pp > 0 && ( )} {/* Percentage score */}
{/* Missed Notes */}
); }