aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--frontend/src/components/displays/GenericScoreDisplay.tsx12
1 files changed, 4 insertions, 8 deletions
diff --git a/frontend/src/components/displays/GenericScoreDisplay.tsx b/frontend/src/components/displays/GenericScoreDisplay.tsx
index 84fe492..6132a19 100644
--- a/frontend/src/components/displays/GenericScoreDisplay.tsx
+++ b/frontend/src/components/displays/GenericScoreDisplay.tsx
@@ -76,9 +76,7 @@ const ScoreDisplay: React.FC<ScoreDisplayProps> = ({
"grade",
];
const expandableKeys = ["judgements", "optional"];
- const skipKeys = ["user", "username"]
- // get ?game=
- const internalGameName =new URLSearchParams(window.location.search).get("game") || "dancerush";
+ const gameParam = new URLSearchParams(window.location.search).get("game") || "generic";
// eslint-disable-next-line @typescript-eslint/no-explicit-any
const formatValue = (value: any, key: string): string => {
if (value === null || value === undefined) return "N/A";
@@ -269,11 +267,9 @@ const ScoreDisplay: React.FC<ScoreDisplayProps> = ({
return (
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-2 xl:grid-cols-3 gap-4 sm:gap-6">
{sortedScores.map((score, index) => {
- const chartIdHash = SHA1(`${internalGameName}${score.title}${score.artist}`).toString();
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
- const { mainStats, expandable, others: rawOthers, timestamp } =
+ const chartIdHash = SHA1(`${gameParam}${score.title}${score.artist}`).toString();
+ const { mainStats, expandable, others, timestamp } =
getScoreEntries(score);
- const others = rawOthers.filter(([key]) => !skipKeys.includes(key));
return (
@@ -285,7 +281,7 @@ const ScoreDisplay: React.FC<ScoreDisplayProps> = ({
<div className="flex items-start justify-between mb-4">
<div className="flex-1 min-w-0">
{!hideTitleArtist && (
- <Link to={`/chart?chartId=${chartIdHash}&game=${internalGameName}`}>
+ <Link to={`/chart?chartId=${chartIdHash}&game=${gameParam}`}>
<h3 className="text-base sm:text-lg font-semibold text-white mb-1 break-words leading-tight">
{score.title || score.song || "Unknown Title"}
</h3>
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage