mirror of
https://gitea.tendokyu.moe/pinapelz/Mirage.git
synced 2026-09-22 22:38:04 +03:00
remove unused primaryKey from score displays
This commit is contained in:
@@ -62,7 +62,6 @@ const DivaScoreDisplay: React.FC<ScoreDisplayProps> = ({
|
||||
num_players: "Players"
|
||||
};
|
||||
|
||||
const primaryKeys = ["title", "artist", "song"];
|
||||
const mainStatKeys = [
|
||||
"score",
|
||||
"difficulty",
|
||||
@@ -226,19 +225,16 @@ const DivaScoreDisplay: React.FC<ScoreDisplayProps> = ({
|
||||
([key]) => !globalSkipKeys.includes(key),
|
||||
);
|
||||
|
||||
const primary = entries.filter(([key]) => primaryKeys.includes(key));
|
||||
const mainStats = entries.filter(([key]) => mainStatKeys.includes(key));
|
||||
const expandable = entries.filter(([key]) => expandableKeys.includes(key));
|
||||
const others = entries.filter(
|
||||
([key]) =>
|
||||
!primaryKeys.includes(key) &&
|
||||
!mainStatKeys.includes(key) &&
|
||||
!expandableKeys.includes(key) &&
|
||||
key !== "timestamp",
|
||||
);
|
||||
|
||||
return {
|
||||
primary,
|
||||
mainStats,
|
||||
expandable,
|
||||
others,
|
||||
@@ -324,7 +320,7 @@ const DivaScoreDisplay: React.FC<ScoreDisplayProps> = ({
|
||||
<div className="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-2 xl:grid-cols-3 gap-6">
|
||||
{sortedScores.map((score, index) => {
|
||||
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
||||
const { primary, mainStats, expandable, others, timestamp } =
|
||||
const { mainStats, expandable, others, timestamp } =
|
||||
getScoreEntries(score);
|
||||
const chartIdHash = SHA1(`diva${score.title}${score.artist}`).toString();
|
||||
return (
|
||||
|
||||
@@ -65,7 +65,6 @@ const ScoreDisplay: React.FC<ScoreDisplayProps> = ({
|
||||
num_players: "Players"
|
||||
};
|
||||
|
||||
const primaryKeys = ["title", "artist", "song"];
|
||||
const mainStatKeys = [
|
||||
"score",
|
||||
"difficulty",
|
||||
@@ -177,19 +176,16 @@ const ScoreDisplay: React.FC<ScoreDisplayProps> = ({
|
||||
([key]) => !globalSkipKeys.includes(key),
|
||||
);
|
||||
|
||||
const primary = entries.filter(([key]) => primaryKeys.includes(key));
|
||||
const mainStats = entries.filter(([key]) => mainStatKeys.includes(key));
|
||||
const expandable = entries.filter(([key]) => expandableKeys.includes(key));
|
||||
const others = entries.filter(
|
||||
([key]) =>
|
||||
!primaryKeys.includes(key) &&
|
||||
!mainStatKeys.includes(key) &&
|
||||
!expandableKeys.includes(key) &&
|
||||
key !== "timestamp",
|
||||
);
|
||||
|
||||
return {
|
||||
primary,
|
||||
mainStats,
|
||||
expandable,
|
||||
others,
|
||||
@@ -275,7 +271,7 @@ 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: rawOthers, timestamp } =
|
||||
const { mainStats, expandable, others: rawOthers, timestamp } =
|
||||
getScoreEntries(score);
|
||||
const others = rawOthers.filter(([key]) => !skipKeys.includes(key));
|
||||
|
||||
|
||||
@@ -65,7 +65,6 @@ const MusicDiverDisplay: React.FC<ScoreDisplayProps> = ({
|
||||
num_players: "Players"
|
||||
};
|
||||
|
||||
const primaryKeys = ["title", "artist", "song"];
|
||||
const mainStatKeys = [
|
||||
"score",
|
||||
"level",
|
||||
@@ -176,20 +175,16 @@ const MusicDiverDisplay: React.FC<ScoreDisplayProps> = ({
|
||||
const entries = Object.entries(score).filter(
|
||||
([key]) => !globalSkipKeys.includes(key),
|
||||
);
|
||||
|
||||
const primary = entries.filter(([key]) => primaryKeys.includes(key));
|
||||
const mainStats = entries.filter(([key]) => mainStatKeys.includes(key));
|
||||
const expandable = entries.filter(([key]) => expandableKeys.includes(key));
|
||||
const others = entries.filter(
|
||||
([key]) =>
|
||||
!primaryKeys.includes(key) &&
|
||||
!mainStatKeys.includes(key) &&
|
||||
!expandableKeys.includes(key) &&
|
||||
key !== "timestamp",
|
||||
);
|
||||
|
||||
return {
|
||||
primary,
|
||||
mainStats,
|
||||
expandable,
|
||||
others,
|
||||
@@ -275,7 +270,7 @@ const MusicDiverDisplay: 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: rawOthers, timestamp } =
|
||||
const { mainStats, expandable, others: rawOthers, timestamp } =
|
||||
getScoreEntries(score);
|
||||
const others = rawOthers.filter(([key]) => !skipKeys.includes(key));
|
||||
|
||||
|
||||
@@ -65,7 +65,6 @@ const NostalgiaScoreDisplay: React.FC<ScoreDisplayProps> = ({
|
||||
num_players: "Players"
|
||||
};
|
||||
|
||||
const primaryKeys = ["title", "artist", "song"];
|
||||
const mainStatKeys = [
|
||||
"score",
|
||||
"difficulty",
|
||||
@@ -178,19 +177,16 @@ const NostalgiaScoreDisplay: React.FC<ScoreDisplayProps> = ({
|
||||
([key]) => !globalSkipKeys.includes(key),
|
||||
);
|
||||
|
||||
const primary = entries.filter(([key]) => primaryKeys.includes(key));
|
||||
const mainStats = entries.filter(([key]) => mainStatKeys.includes(key));
|
||||
const expandable = entries.filter(([key]) => expandableKeys.includes(key));
|
||||
const others = entries.filter(
|
||||
([key]) =>
|
||||
!primaryKeys.includes(key) &&
|
||||
!mainStatKeys.includes(key) &&
|
||||
!expandableKeys.includes(key) &&
|
||||
key !== "timestamp",
|
||||
);
|
||||
|
||||
return {
|
||||
primary,
|
||||
mainStats,
|
||||
expandable,
|
||||
others,
|
||||
@@ -276,7 +272,7 @@ const NostalgiaScoreDisplay: 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: rawOthers, timestamp } =
|
||||
const { mainStats, expandable, others: rawOthers, timestamp } =
|
||||
getScoreEntries(score);
|
||||
const others = rawOthers.filter(([key]) => !skipKeys.includes(key));
|
||||
|
||||
|
||||
@@ -67,7 +67,6 @@ const ReflecBeatScoreDisplay: React.FC<ScoreDisplayProps> = ({
|
||||
num_players: "Players"
|
||||
};
|
||||
|
||||
const primaryKeys = ["title", "artist", "song"];
|
||||
const mainStatKeys = [
|
||||
"score",
|
||||
"difficulty",
|
||||
@@ -184,19 +183,16 @@ const ReflecBeatScoreDisplay: React.FC<ScoreDisplayProps> = ({
|
||||
([key]) => !globalSkipKeys.includes(key),
|
||||
);
|
||||
|
||||
const primary = entries.filter(([key]) => primaryKeys.includes(key));
|
||||
const mainStats = entries.filter(([key]) => mainStatKeys.includes(key));
|
||||
const expandable = entries.filter(([key]) => expandableKeys.includes(key));
|
||||
const others = entries.filter(
|
||||
([key]) =>
|
||||
!primaryKeys.includes(key) &&
|
||||
!mainStatKeys.includes(key) &&
|
||||
!expandableKeys.includes(key) &&
|
||||
key !== "timestamp",
|
||||
);
|
||||
|
||||
return {
|
||||
primary,
|
||||
mainStats,
|
||||
expandable,
|
||||
others,
|
||||
@@ -282,7 +278,7 @@ const ReflecBeatScoreDisplay: 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: rawOthers, timestamp } =
|
||||
const { mainStats, expandable, others: rawOthers, timestamp } =
|
||||
getScoreEntries(score);
|
||||
const others = rawOthers.filter(([key]) => !skipKeys.includes(key));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user