import { CellProps, Column } from 'react-table'; import { Link } from '@@/Link'; export function buildNameColumn>( nameKey: string, idKey: string, path: string ) { const name: Column = { Header: 'Name', accessor: (row) => row[nameKey], id: 'name', Cell: NameCell, disableFilters: true, Filter: () => null, canHide: false, sortType: 'string', }; return name; function NameCell({ value: name, row }: CellProps) { return ( {name} ); } }