fix: misc dan_gauge cleanup

This commit is contained in:
zkldi
2022-05-02 02:49:40 +01:00
parent 4376fcd109
commit 82a1f634bd
2 changed files with 15 additions and 4 deletions
@@ -36,7 +36,7 @@ export default function IIDXLampChart({
} & ResponsiveLine["props"]) {
let realData = [];
if (type === "HARD" || type === "EX_HARD") {
if (type === "HARD" || type === "EX_HARD" || type === "DAN_GAUGE") {
realData = data;
} else {
const failSet = [];
@@ -73,6 +73,16 @@ export function IIDXGraphsComponent({
<>
<div className="col-12 d-flex justify-content-center">
<Nav variant="pills">
{score.scoreData.lamp === "NO PLAY" && (
<SelectNav
id="DAN_GAUGE"
value={lamp}
setValue={setLamp}
disabled={shouldDisable("DAN_GAUGE")}
>
Dan Gauge
</SelectNav>
)}
<SelectNav
id="EASY"
value={lamp}
@@ -156,6 +166,10 @@ function LampToKey(
): LampTypes {
const lamp = score.scoreData.lamp;
if (lamp === "NO PLAY") {
return "DAN_GAUGE";
}
if (IsScore(score) && score.scoreMeta.gauge) {
switch (score.scoreMeta.gauge) {
case "EASY":
@@ -183,9 +197,6 @@ function LampToKey(
return "EX_HARD";
}
return "NORMAL";
} else if (lamp === "NO PLAY") {
// dan gauge looks like this
return "DAN_GAUGE";
}
return "NORMAL";