import React from "react"; import { Column } from "react-table"; import { InjectedRouter } from "react-router"; import { IHeaderProps, IStringCellProps } from "interfaces/datatable_config"; import { ICombinedFMA } from "interfaces/software"; import HeaderCell from "components/TableContainer/DataTable/HeaderCell"; import SoftwareNameCell from "components/TableContainer/DataTable/SoftwareNameCell"; import InstallerActionCell from "components/TableContainer/DataTable/InstallerActionCell"; type IFleetMaintainedAppsTableConfig = Column; type ITableStringCellProps = IStringCellProps; type ITableHeaderProps = IHeaderProps; // eslint-disable-next-line import/prefer-default-export export const generateTableConfig = ( router: InjectedRouter, teamId: number ): IFleetMaintainedAppsTableConfig[] => { return [ { Header: (cellProps: ITableHeaderProps) => ( ), accessor: "name", Cell: (cellProps: ITableStringCellProps) => { const { name } = cellProps.row.original; return ; }, sortType: "caseInsensitive", }, { Header: "macOS", accessor: "macos", Cell: (cellProps: any) => { const { macos } = cellProps.row.original; return ( ); }, disableSortBy: true, }, { Header: "Windows", accessor: "windows", Cell: (cellProps: any) => { const { windows } = cellProps.row.original; return ( ); }, disableSortBy: true, }, ]; };