import { CellProps, Column } from 'react-table'; import { Environment } from '@/portainer/environments/types'; import { Link } from '@@/Link'; import { ExpandingCell } from '@@/datatables/ExpandingCell'; import { useRowContext } from './RowContext'; export const name: Column = { Header: 'Name', accessor: (row) => row.Name, id: 'name', Cell: NameCell, disableFilters: true, Filter: () => null, canHide: false, sortType: 'string', }; export function NameCell({ value: name, row }: CellProps) { const { isOpenAmtEnabled } = useRowContext(); const showExpandedRow = !!( isOpenAmtEnabled && row.original.AMTDeviceGUID && row.original.AMTDeviceGUID.length > 0 ); return ( {name} ); }