From b58fbbec62aaac31fca4a34cd7d5dc87e2d6d449 Mon Sep 17 00:00:00 2001 From: Kalle <38327916+Sendouc@users.noreply.github.com> Date: Sun, 7 Apr 2024 13:50:00 +0300 Subject: [PATCH] Show difference from base value if not comparing in ConsumptionTable --- app/features/build-analyzer/routes/analyzer.tsx | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/app/features/build-analyzer/routes/analyzer.tsx b/app/features/build-analyzer/routes/analyzer.tsx index d220bdff1..c902913de 100644 --- a/app/features/build-analyzer/routes/analyzer.tsx +++ b/app/features/build-analyzer/routes/analyzer.tsx @@ -1715,11 +1715,19 @@ function ConsumptionTable({ const opt1 = options1ForThisSubsUsed[i]; const opt2 = options2ForThisSubsUsed[i]; - const contents = !isComparing - ? opt1.value - : `${opt1?.value ?? "-"}/${opt2?.value ?? "-"}`; + const contents = () => { + if (isComparing) { + return `${opt1?.value ?? "-"}/${opt2?.value ?? "-"}`; + } - cells.push(