added diff name and setup skeleton for top recent plays

This commit is contained in:
Polaris
2024-08-14 11:52:19 -04:00
parent a2f5febb60
commit ad12f07cde
7 changed files with 93 additions and 8 deletions

View File

@ -17,10 +17,10 @@ export const getDifficultyClass = (level: number) => {
}
};
export const getDifficultyText = (chartId: number) => {
export const getDifficultyText = (chartId: number | null) => {
switch (chartId) {
case 0:
return "EASY"; // Text for difficulty
return "EASY";
case 1:
return "ADVANCE";
case 2:
@ -31,9 +31,12 @@ export const getDifficultyText = (chartId: number) => {
return "ULTIMA";
case 5:
return "WORLDS END";
default:
return "UNKNOWN"; // Default text if chartId doesn't match any case
}
};
export const getGrade = (score: number) => {
if (score >= 1009000) return "SSS+";
if (score >= 1007500 && score <= 1008999) return "SSS";