1
0
Fork 0
mirror of https://github.com/mastodon/mastodon.git synced 2024-08-20 21:08:15 -07:00
mastodon/app/assets/javascripts/components/components/relative_timestamp.jsx

16 lines
316 B
React
Raw Normal View History

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