spiff-arena/spiffworkflow-frontend/src/components/TableCellWithTimeAgoInWords.tsx

18 lines
420 B
TypeScript

// @ts-ignore
import { TimeAgo } from '../helpers/timeago';
import { convertSecondsToFormattedDateTime } from '../helpers';
type OwnProps = {
timeInSeconds: number;
};
export default function TableCellWithTimeAgoInWords({
timeInSeconds,
}: OwnProps) {
return (
<td title={convertSecondsToFormattedDateTime(timeInSeconds) || '-'}>
{timeInSeconds ? TimeAgo.inWords(timeInSeconds) : '-'}
</td>
);
}