From c03252bc8d9886c480929978fa535d74e18d22dc Mon Sep 17 00:00:00 2001 From: Wojciech Krzywiec Date: Sat, 30 Nov 2024 20:53:00 +0000 Subject: [PATCH] Table.tsx --- services/mankkoo-ui/components/charts/Table.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/services/mankkoo-ui/components/charts/Table.tsx b/services/mankkoo-ui/components/charts/Table.tsx index 0283ef9..bfa03cb 100644 --- a/services/mankkoo-ui/components/charts/Table.tsx +++ b/services/mankkoo-ui/components/charts/Table.tsx @@ -53,7 +53,7 @@ export default function Table({ { rowData.map((cellData, cellIndex) => { - if (shouldAddColorCircleToCell(cellData, preparedData, rowIndex, boldLastRow)) { + if (shouldAddColorCircleToCell(preparedData, rowIndex, boldLastRow, cellData)) { return } @@ -134,7 +134,7 @@ function shouldBoldFirstRow(data: string[][], rowIndex: number, hasHeader: boole return hasHeader && rowIndex === 0; } -function shouldAddColorCircleToCell(cellData?: string, data: string[][], rowIndex: number, boldLastRow: boolean) { +function shouldAddColorCircleToCell(data: string[][], rowIndex: number, boldLastRow: boolean, cellData?: string) { return cellData?.includes(COLOR_CIRCLE_CELL_PATTERN) && !shouldBoldLastRow(data, rowIndex, boldLastRow) }