mirror of
https://github.com/sartography/spiff-arena.git
synced 2025-03-04 02:50:38 +00:00
18 lines
420 B
TypeScript
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>
|
|
);
|
|
}
|