refactor: Format value requests_count on client table

This commit is contained in:
bankjirapan
2025-01-21 14:45:31 +07:00
parent acbad67f47
commit 84d72cb842

View File

@@ -12,7 +12,7 @@ import ReactTable from 'react-table';
import { getAllBlockedServices, getBlockedServices } from '../../../../actions/services';
import { initSettings } from '../../../../actions';
import { splitByNewLine, countClientsStatistics, sortIp, getService } from '../../../../helpers/helpers';
import { splitByNewLine, countClientsStatistics, sortIp, getService, formatNumber } from '../../../../helpers/helpers';
import { MODAL_TYPE, LOCAL_TIMEZONE_VALUE, TABLES_MIN_ROWS } from '../../../../helpers/constants';
import Card from '../../../ui/Card';
@@ -300,12 +300,12 @@ const ClientsTable = ({
sortMethod: (a: any, b: any) => b - a,
minWidth: 120,
Cell: (row: any) => {
const content = CellWrap(row);
let content = CellWrap(row);
if (!row.value) {
return content;
}
content = typeof content === "number" ? formatNumber(content) : content;
return <LogsSearchLink search={row.original.name}>{content}</LogsSearchLink>;
},
},