Create app namespace for all absolute requires of app modules. Move all packages under packages yarn workspace

This commit is contained in:
SleepWalker
2019-12-07 21:02:00 +02:00
parent d8d2df0702
commit f9d3bb4e20
404 changed files with 758 additions and 742 deletions

View File

@ -0,0 +1,20 @@
import React from 'react';
import { FormattedRelativeTime } from 'react-intl';
import { selectUnit } from '@formatjs/intl-utils';
function RelativeTime({ timestamp }: { timestamp: number }) {
const { unit, value }: { unit: any; value: number } = selectUnit(timestamp);
return (
<FormattedRelativeTime
value={value}
unit={unit}
numeric="auto"
updateIntervalInSeconds={
['seconds', 'minute', 'hour'].includes(unit) ? 1 : undefined
}
/>
);
}
export default RelativeTime;