mastodon/app/assets/javascripts/components/components/relative_timestamp.jsx

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;