aboutsummaryrefslogtreecommitdiffstats
path: root/frontend/src
diff options
context:
space:
mode:
authorPinapelz <yukais@pinapelz.com>2025-10-08 01:34:39 -0700
committerPinapelz <yukais@pinapelz.com>2025-10-08 01:34:39 -0700
commitc9ca64aafb06de8c31b46efd9df94e74cea350fb (patch)
treec4db666c3a2ea7eb85c6c61d8061b4e5cf835b49 /frontend/src
parentf2dfc50001e146fbb2d9a32a6825e415a27b6d18 (diff)
frontend: hide certain irrelevant keys from generic score display
Diffstat (limited to 'frontend/src')
-rw-r--r--frontend/src/components/displays/GenericScoreDisplay.tsx5
1 files changed, 4 insertions, 1 deletions
diff --git a/frontend/src/components/displays/GenericScoreDisplay.tsx b/frontend/src/components/displays/GenericScoreDisplay.tsx
index 05d9f1e..054f7de 100644
--- a/frontend/src/components/displays/GenericScoreDisplay.tsx
+++ b/frontend/src/components/displays/GenericScoreDisplay.tsx
@@ -76,6 +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";
// eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -273,8 +274,10 @@ const ScoreDisplay: React.FC<ScoreDisplayProps> = ({
{sortedScores.map((score, index) => {
const chartIdHash = SHA1(`${internalGameName}${score.title}${score.artist}`).toString();
// eslint-disable-next-line @typescript-eslint/no-unused-vars
- const { primary, mainStats, expandable, others, timestamp } =
+ const { primary, mainStats, expandable, others: rawOthers, timestamp } =
getScoreEntries(score);
+ const others = rawOthers.filter(([key]) => !skipKeys.includes(key));
+
return (
<div
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage