import { ScoresaberLeaderboardInfo } from "@/schemas/scoresaber/leaderboard"; import { ScoresaberPlayer } from "@/schemas/scoresaber/player"; import { ScoresaberScore } from "@/schemas/scoresaber/score"; import { formatNumber } from "@/utils/number"; import { formatDate, formatTimeAgo } from "@/utils/timeUtils"; import { CheckIcon, GlobeAsiaAustraliaIcon, XMarkIcon, } from "@heroicons/react/20/solid"; import clsx from "clsx"; import Image from "next/image"; import ScoreStatLabel from "./ScoreStatLabel"; type ScoreProps = { score: ScoresaberScore; player: ScoresaberPlayer; leaderboard: ScoresaberLeaderboardInfo; }; export default function Score({ score, player, leaderboard }: ScoreProps) { const isFullCombo = score.missedNotes + score.badCuts === 0; return (
#{formatNumber(score.rank)}
{formatTimeAgo(score.timeSet)}
{leaderboard.songName}
{leaderboard.songAuthorName}{" "} {leaderboard.levelAuthorName}
#{formatNumber(score.rank)}
{formatTimeAgo(score.timeSet)}