diff options
| author | Pinapelz <yukais@pinapelz.com> | 2025-10-08 01:34:39 -0700 |
|---|---|---|
| committer | Pinapelz <yukais@pinapelz.com> | 2025-10-08 01:34:39 -0700 |
| commit | c9ca64aafb06de8c31b46efd9df94e74cea350fb (patch) | |
| tree | c4db666c3a2ea7eb85c6c61d8061b4e5cf835b49 /frontend/src/components/displays | |
| parent | f2dfc50001e146fbb2d9a32a6825e415a27b6d18 (diff) | |
frontend: hide certain irrelevant keys from generic score display
Diffstat (limited to 'frontend/src/components/displays')
| -rw-r--r-- | frontend/src/components/displays/GenericScoreDisplay.tsx | 5 |
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 |
