import React, { FC } from "react"; import { getDifficultyText } from "@/lib/helpers"; type userRatingBaseList = { title: string; artist: string; genre: string; chartId: string | number; level: string | number; jacketPath: string; rating: number; version: number; index: number; musicId: number | null; difficultId: number | null; score: number | null; }; type ChunithmProfileHotPlays = { chuniProfileHotPlays: { hotRating: userRatingBaseList[]; }; }; export const ChunithmHotPlays: FC = ({ chuniProfileHotPlays, }) => { return (
{chuniProfileHotPlays.hotRating.map((playerHotRatingList, index) => { const jacketPath = playerHotRatingList.jacketPath?.replace( ".dds", ".png", ); return (
{index + 1}.
{jacketPath && ( Jacket )}
  • Title: {playerHotRatingList.title}
  • Level: {playerHotRatingList.level}
  • Difficulty: {getDifficultyText(Number(playerHotRatingList.chartId))}
  • Score: {" "} {playerHotRatingList.score?.toLocaleString()}
  • Rating: {" "} {(playerHotRatingList.rating / 100).toFixed(2)}
); })}
); };