import type { IIntegration, Serialized } from '@rocket.chat/core-typings'; import { Box } from '@rocket.chat/fuselage'; import { GenericTableCell, GenericTableRow } from '@rocket.chat/ui-client'; import { useFormatDateAndTime } from '../../../hooks/useFormatDateAndTime'; type IntegrationRowProps = { integration: Serialized; isMobile: boolean; onClick: (_id: string, type: string) => () => void; }; const IntegrationRow = ({ integration, onClick, isMobile }: IntegrationRowProps) => { const formatDateAndTime = useFormatDateAndTime(); const { _id, name, type, username, _createdAt, _createdBy, channel } = integration; return ( {name} {channel.join(', ')} {_createdBy?.username} {!isMobile && ( {formatDateAndTime(_createdAt)} )} {username} ); }; export default IntegrationRow;