import { CellProps, Column } from 'react-table'; import clsx from 'clsx'; import { Environment, EnvironmentStatus } from '@/portainer/environments/types'; import { useRowContext } from '@/edge/devices/components/EdgeDevicesDatatable/columns/RowContext'; export const heartbeat: Column = { Header: 'Heartbeat', accessor: 'Status', id: 'status', Cell: StatusCell, disableFilters: true, canHide: true, }; export function StatusCell({ row: { original: environment }, }: CellProps) { const { disableTrustOnFirstConnect } = useRowContext(); if (disableTrustOnFirstConnect && !environment.UserTrusted) { return untrusted; } if (!environment.LastCheckInDate) { return ( associated ); } return (