1
0
mirror of https://github.com/funamitech/mastodon synced 2024-11-25 15:46:44 +09:00
YuruToot/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-18 00:34:36 +09:00
const RelativeTimestamp = ({ timestamp }) => {
return <FormattedRelative value={new Date(timestamp)} />;
};
2016-08-25 04:08:00 +09:00
RelativeTimestamp.propTypes = {
2016-11-18 00:34:36 +09:00
timestamp: React.PropTypes.string.isRequired
};
2016-08-25 04:08:00 +09:00
export default RelativeTimestamp;