16 lines
316 B
JavaScript
16 lines
316 B
JavaScript
import {
|
|
FormattedMessage,
|
|
FormattedDate,
|
|
FormattedRelative
|
|
} from 'react-intl';
|
|
|
|
const RelativeTimestamp = ({ timestamp }) => {
|
|
return <FormattedRelative value={new Date(timestamp)} />;
|
|
};
|
|
|
|
RelativeTimestamp.propTypes = {
|
|
timestamp: React.PropTypes.string.isRequired
|
|
};
|
|
|
|
export default RelativeTimestamp;
|