aboutsummaryrefslogtreecommitdiffstats
path: root/frontend/src/components/displays/GenericScoreDisplay.tsx
diff options
context:
space:
mode:
authorPinapelz <yukais@pinapelz.com>2025-07-07 00:00:22 -0700
committerPinapelz <yukais@pinapelz.com>2025-07-07 00:00:22 -0700
commit152894146b72830e48e800721ea6160228a9bdc1 (patch)
tree081a7e0c7988988d14583894c2f2ea80d2ab0538 /frontend/src/components/displays/GenericScoreDisplay.tsx
parentdf79d68cb3cbec15e985fed8c0cabc484ef55e35 (diff)
generate sha-1 hash for chart on score import
Diffstat (limited to 'frontend/src/components/displays/GenericScoreDisplay.tsx')
-rw-r--r--frontend/src/components/displays/GenericScoreDisplay.tsx12
1 files changed, 3 insertions, 9 deletions
diff --git a/frontend/src/components/displays/GenericScoreDisplay.tsx b/frontend/src/components/displays/GenericScoreDisplay.tsx
index 3358f8d..c30e475 100644
--- a/frontend/src/components/displays/GenericScoreDisplay.tsx
+++ b/frontend/src/components/displays/GenericScoreDisplay.tsx
@@ -1,4 +1,5 @@
import React from "react";
+import { globalSkipKeys } from "../../types/constants";
interface Score {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -53,13 +54,6 @@ const ScoreDisplay: React.FC<ScoreDisplayProps> = ({
time: "Time",
};
- const skipKeys = [
- "id",
- "internalname",
- "internalName",
- "gameInternalName",
- "userId",
- ];
const primaryKeys = ["title", "artist", "song"];
const mainStatKeys = [
"score",
@@ -165,7 +159,7 @@ const ScoreDisplay: React.FC<ScoreDisplayProps> = ({
const getScoreEntries = (score: Score) => {
const entries = Object.entries(score).filter(
- ([key]) => !skipKeys.includes(key),
+ ([key]) => !globalSkipKeys.includes(key),
);
const primary = entries.filter(([key]) => primaryKeys.includes(key));
@@ -224,7 +218,7 @@ const ScoreDisplay: React.FC<ScoreDisplayProps> = ({
// Get all possible keys for table headers
const allKeys = Array.from(
new Set(scores.flatMap((score) => Object.keys(score))),
- ).filter((key) => !skipKeys.includes(key));
+ ).filter((key) => !globalSkipKeys.includes(key));
// Prioritize important keys for table display
const tableKeys = [
send patches to the email below
yukais@pinapelz.com
include the subject [PATCH repo_name]
pinapelz.com
homepage