refactor: fix conditional check for content formatting in statistics column

This commit is contained in:
bankjirapan
2025-02-20 23:07:59 +07:00
parent 84d72cb842
commit 64fe768725

View File

@@ -300,12 +300,15 @@ const ClientsTable = ({
sortMethod: (a: any, b: any) => b - a, sortMethod: (a: any, b: any) => b - a,
minWidth: 120, minWidth: 120,
Cell: (row: any) => { Cell: (row: any) => {
let content = CellWrap(row); let content = row.value;
if (typeof content === "number") {
if (!row.value) { content = formatNumber(content);
return content; } else {
content = CellWrap(row);
} }
content = typeof content === "number" ? formatNumber(content) : content; if (!content) {
return content;
}
return <LogsSearchLink search={row.original.name}>{content}</LogsSearchLink>; return <LogsSearchLink search={row.original.name}>{content}</LogsSearchLink>;
}, },
}, },