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