2016-11-17 03:20:52 +11:00
|
|
|
import {
|
|
|
|
FormattedMessage,
|
|
|
|
FormattedDate,
|
|
|
|
FormattedRelative
|
|
|
|
} from 'react-intl';
|
|
|
|
|
2016-11-18 02:34:36 +11:00
|
|
|
const RelativeTimestamp = ({ timestamp }) => {
|
|
|
|
return <FormattedRelative value={new Date(timestamp)} />;
|
2016-11-17 03:20:52 +11:00
|
|
|
};
|
2016-08-25 05:08:00 +10:00
|
|
|
|
2016-11-17 03:20:52 +11:00
|
|
|
RelativeTimestamp.propTypes = {
|
2016-11-18 02:34:36 +11:00
|
|
|
timestamp: React.PropTypes.string.isRequired
|
2016-11-17 03:20:52 +11:00
|
|
|
};
|
2016-08-25 05:08:00 +10:00
|
|
|
|
|
|
|
export default RelativeTimestamp;
|