mastodon/app/assets/javascripts/components/components/relative_timestamp.jsx
2016-11-17 16:34:36 +01:00

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;