import { PureComponent } from 'react'; import PropTypes from 'prop-types'; import { FormattedMessage, injectIntl } from 'react-intl'; import { Icon } from 'flavours/glitch/components/icon'; import DropdownMenu from './containers/dropdown_menu_container'; import { connect } from 'react-redux'; import { openModal } from 'flavours/glitch/actions/modal'; import { RelativeTimestamp } from 'flavours/glitch/components/relative_timestamp'; import InlineAccount from 'flavours/glitch/components/inline_account'; const mapDispatchToProps = (dispatch, { statusId }) => ({ onItemClick (index) { dispatch(openModal('COMPARE_HISTORY', { index, statusId })); }, }); class EditedTimestamp extends PureComponent { static propTypes = { statusId: PropTypes.string.isRequired, timestamp: PropTypes.string.isRequired, intl: PropTypes.object.isRequired, onItemClick: PropTypes.func.isRequired, }; handleItemClick = (item, i) => { const { onItemClick } = this.props; onItemClick(i); }; renderHeader = items => { return ( ); }; renderItem = (item, index, { onClick, onKeyPress }) => { const formattedDate = ; const formattedName = ; const label = item.get('original') ? ( ) : ( ); return (
  • ); }; render () { const { timestamp, intl, statusId } = this.props; return ( ); } } export default connect(null, mapDispatchToProps)(injectIntl(EditedTimestamp));