import { Column } from 'react-table'; import { UserInfoCell } from './UserInfoCell'; import { PaymentMonthCell } from './UserLastLoginCell'; import { AgentCell } from './AgentCell'; import { UserActionsCell } from './UserActionsCell'; import { UserSelectionCell } from './UserSelectionCell'; import { UserCustomHeader } from './UserCustomHeader'; import { UserSelectionHeader } from './UserSelectionHeader'; import { User } from '../../../core/_models'; import { AddedCell } from './AddedCell'; const formatNumberWithCommas = (number: string): string => { return number.replace(/\B(?=(\d{3})+(?!\d))/g, ','); }; const usersColumns: ReadonlyArray> = [ { Header: (props) => , id: 'selection', Cell: ({ ...props }) => ( ), }, { Header: (props) => ( ), id: 'firstname', Cell: ({ ...props }) => , }, { Header: (props) => ( ), accessor: 'loan_amount', Cell: ({ row, data }) => formatNumberWithCommas(data[row.index].loan_amount || '0'), }, { Header: (props) => ( ), id: 'payment_month', Cell: ({ ...props }) => ( ), }, { Header: (props) => ( ), id: 'sales_agent', Cell: ({ ...props }) => ( ), }, { Header: (props) => ( ), id: 'added', Cell: ({ ...props }) => ( ), }, { Header: (props) => ( ), id: 'actions', Cell: ({ ...props }) => ( ), }, ]; export { usersColumns };