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 = { chuniProfileNextPlays: { nextPlays: userRatingBaseList[]; }; }; export const ChunithmNextPlays: FC = ({ chuniProfileNextPlays, }) => { return (
{" "} {chuniProfileNextPlays.nextPlays.map((playerNextRatingList, index) => { const jacketPath = playerNextRatingList.jacketPath?.replace( ".dds", ".png", ); return (
{jacketPath && ( Jacket )}
  • Title: {playerNextRatingList.title}
  • Level: {playerNextRatingList.level}
  • Difficulty: {getDifficultyText(Number(playerNextRatingList.chartId))}
  • Score: {" "} {playerNextRatingList.score?.toLocaleString()}
  • Rating: {" "} {(playerNextRatingList.rating / 100).toFixed(2)}
); })}
); };