/* eslint-disable react/prop-types */ import React from "react"; import { Row } from "react-table"; import { IDataColumn } from "interfaces/datatable_config"; import { IHost } from "interfaces/host"; import TextCell from "components/TableContainer/DataTable/TextCell"; import LiveQueryIssueCell from "components/TableContainer/DataTable/LiveQueryIssueCell/LiveQueryIssueCell"; import StatusIndicator from "components/StatusIndicator"; import RemoveIcon from "../../../../assets/images/icon-action-remove-20x20@2x.png"; interface ICellProps { cell: { value: string; }; row: { original: IHost; }; } // NOTE: cellProps come from react-table // more info here https://react-table.tanstack.com/docs/api/useTable#cell-properties export const generateTableHeaders = ( handleRowRemove?: (value: Row) => void ): IDataColumn[] => { const deleteHeader = handleRowRemove ? [ { id: "delete", Header: "", Cell: (cellProps: { row: Row }): JSX.Element => (