import moment from 'moment'; import styles from './Timestamp.module.css'; export interface TimestampProps { value: string | number | Date; } export function Timestamp({ value }: TimestampProps) { const m = moment(value); const iso = m.toISOString(); const relative = m.fromNow(); return ( {relative} ); }