fix: give ITG a proper lamp cell

This commit is contained in:
zkldi
2023-01-20 20:51:21 +00:00
parent 125859f9c7
commit 34f462e95d
@@ -1,3 +1,4 @@
import { ChangeOpacity } from "util/color-opacity";
import React from "react";
import { PBScoreDocument, ScoreDocument } from "tachi-common";
import { GetEnumColour } from "lib/game-implementations";
@@ -23,7 +24,17 @@ export default function ITGCoreCells({
percent={sc.scoreData.scorePercent}
/>
<ITGJudgementCell score={sc} />
<LampCell lamp={sc.scoreData.lamp} colour={GetEnumColour(sc, "lamp")} />
<td
style={{
backgroundColor: ChangeOpacity(GetEnumColour(sc, "lamp"), 0.2),
}}
>
{sc.scoreData.lamp === "FAILED" ? (
<strong>DIED @ {Math.floor(sc.scoreData.survivedPercent)}%</strong>
) : (
<strong>{sc.scoreData.lamp}</strong>
)}
</td>
{!short && <RatingCell score={sc} rating={rating} />}
</>
);