ok we fix

This commit is contained in:
headpatsyou 2026-01-08 12:47:34 +00:00
parent 37877bf4dd
commit 7ae78a719e

View file

@ -3,7 +3,7 @@ import React, { useEffect, useMemo, useState } from "react";
type Row = Record<string, string>;
const ResultCell = ({ value }: { value: string | undefined }) => {
const ResultCell = ({ value, isTotal = false }: { value: string | undefined; isTotal?: boolean }) => {
if (!value) return <td className="border p-2"></td>;
const numValue = parseFloat(value);
@ -12,6 +12,12 @@ const ResultCell = ({ value }: { value: string | undefined }) => {
const displayValue = isNegative ? Math.abs(numValue).toString() : value;
// For total cells, just make text bold
if (isTotal) {
return <td className="border p-2 font-bold">{displayValue}</td>;
}
// For lift attempt cells, show colored backgrounds
if (isNegative) {
return (
<td className="border p-2 bg-red-600 text-white font-semibold">
@ -157,8 +163,8 @@ export function ResultsTable() {
<ResultCell value={r[squatCol]} />
<ResultCell value={r[benchCol]} />
<ResultCell value={r[deadliftCol]} />
<ResultCell value={r["TotalKg"]} />
<ResultCell value={r["GLPoints"]} />
<ResultCell value={r["TotalKg"]} isTotal />
<ResultCell value={r["GLPoints"]} isTotal />
</tr>
))}
</tbody>