import { ExpandAltOutlined, LinkOutlined, MonitorOutlined, } from '@ant-design/icons'; import Convert from 'ansi-to-html'; import { Button, Space, Typography } from 'antd'; import { ColumnsType } from 'antd/es/table'; import dayjs from 'dayjs'; import dompurify from 'dompurify'; import { useCopyLogLink } from 'hooks/logs/useCopyLogLink'; import { FlatLogData } from 'lib/logs/flatLogData'; import { useCallback, useMemo } from 'react'; import { ExpandIconWrapper } from '../RawLogView/styles'; import { defaultCellStyle, defaultTableStyle } from './config'; import { TableBodyContent } from './styles'; import { ActionsColumnProps, ColumnTypeRender, UseTableViewProps, UseTableViewResult, } from './types'; const convert = new Convert(); function ActionsColumn({ logId, logs, onOpenLogsContext, }: ActionsColumnProps): JSX.Element { const currentLog = useMemo(() => logs.find(({ id }) => id === logId), [ logs, logId, ]); const { onLogCopy } = useCopyLogLink(currentLog?.id); const handleShowContext = useCallback(() => { if (!onOpenLogsContext || !currentLog) return; onOpenLogsContext(currentLog); }, [currentLog, onOpenLogsContext]); return (