import React, { FC } from "react"; import { chuni_profile_rating, chuni_static_music, } from "@/prisma/schemas/artemis/generated/artemis"; 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 chunithmTopPlays = { chuniProfileTopPlays: { topPlays: userRatingBaseList[]; }; }; export const ChunithmTopPlays: FC = ({ chuniProfileTopPlays, }) => { return (
{" "} {chuniProfileTopPlays.topPlays.map((chuniProfileTopPlays, index) => { const jacketPath = chuniProfileTopPlays.jacketPath?.replace( ".dds", ".png", ); return (
{jacketPath && ( Jacket )}
  • Title: {chuniProfileTopPlays.title}
  • Level: {chuniProfileTopPlays.level}
  • Difficulty: {" "} {getDifficultyText(Number(chuniProfileTopPlays.chartId))}
  • Score: {" "} {chuniProfileTopPlays.score?.toLocaleString()}
  • Rating: {" "} {(chuniProfileTopPlays.rating / 100).toFixed(2)}
); })}
); };