added top and hot plays
This commit is contained in:
@ -20,58 +20,56 @@ type userRatingBaseList = {
|
||||
score: number | null;
|
||||
};
|
||||
|
||||
type ChunithmProfileRecentPlays = {
|
||||
chuniProfileRecentPlays: {
|
||||
recentRating: userRatingBaseList[];
|
||||
type chunithmTopPlays = {
|
||||
chuniProfileTopPlays: {
|
||||
topPlays: userRatingBaseList[];
|
||||
};
|
||||
};
|
||||
export const ChunithmRecentPlays: FC<ChunithmProfileRecentPlays> = ({
|
||||
chuniProfileRecentPlays,
|
||||
export const ChunithmTopPlays: FC<chunithmTopPlays> = ({
|
||||
chuniProfileTopPlays,
|
||||
}) => {
|
||||
return (
|
||||
<div>
|
||||
{chuniProfileRecentPlays.recentRating.map(
|
||||
(playersRecentRatingList, index) => {
|
||||
const jacketPath = playersRecentRatingList.jacketPath?.replace(
|
||||
".dds",
|
||||
".png",
|
||||
);
|
||||
return (
|
||||
<div key={index} className="center flex p-2">
|
||||
<div className="m-4 font-bold">{index + 1}.</div>
|
||||
{jacketPath && (
|
||||
<img
|
||||
src={`/JacketArt/${jacketPath}`}
|
||||
alt="Jacket"
|
||||
style={{ width: "120px", height: "120px" }}
|
||||
/>
|
||||
)}
|
||||
<div>
|
||||
<ul className="pl-2">
|
||||
<li>
|
||||
<strong>Title: </strong> {playersRecentRatingList.title}
|
||||
</li>
|
||||
<li>
|
||||
<strong>Level: </strong> {playersRecentRatingList.level}
|
||||
</li>
|
||||
<li>
|
||||
<strong>Difficulty: </strong>
|
||||
{getDifficultyText(Number(playersRecentRatingList.chartId))}
|
||||
</li>
|
||||
<li>
|
||||
<strong>Score: </strong>{" "}
|
||||
{playersRecentRatingList.score?.toLocaleString()}
|
||||
</li>
|
||||
<li>
|
||||
<strong>Rating: </strong>{" "}
|
||||
{(playersRecentRatingList.rating / 100).toFixed(2)}
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
{chuniProfileTopPlays.topPlays.map((chuniProfileTopPlays, index) => {
|
||||
const jacketPath = chuniProfileTopPlays.jacketPath?.replace(
|
||||
".dds",
|
||||
".png",
|
||||
);
|
||||
return (
|
||||
<div key={index} className="center flex p-2">
|
||||
<div className="m-4 font-bold">{index + 1}.</div>
|
||||
{jacketPath && (
|
||||
<img
|
||||
src={`/JacketArt/${jacketPath}`}
|
||||
alt="Jacket"
|
||||
style={{ width: "120px", height: "120px" }}
|
||||
/>
|
||||
)}
|
||||
<div>
|
||||
<ul className="pl-2">
|
||||
<li>
|
||||
<strong>Title: </strong> {chuniProfileTopPlays.title}
|
||||
</li>
|
||||
<li>
|
||||
<strong>Level: </strong> {chuniProfileTopPlays.level}
|
||||
</li>
|
||||
<li>
|
||||
<strong>Difficulty: </strong>
|
||||
{getDifficultyText(Number(chuniProfileTopPlays.chartId))}
|
||||
</li>
|
||||
<li>
|
||||
<strong>Score: </strong>{" "}
|
||||
{chuniProfileTopPlays.score?.toLocaleString()}
|
||||
</li>
|
||||
<li>
|
||||
<strong>Rating: </strong>{" "}
|
||||
{(chuniProfileTopPlays.rating / 100).toFixed(2)}
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
);
|
||||
},
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
})}
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
Reference in New Issue
Block a user