import PropTypes from 'prop-types'; import { PureComponent } from 'react'; import { FormattedMessage, injectIntl } from 'react-intl'; import { connect } from 'react-redux'; import { openModal } from 'flavours/glitch/actions/modal'; import { Icon } from 'flavours/glitch/components/icon'; import InlineAccount from 'flavours/glitch/components/inline_account'; import { RelativeTimestamp } from 'flavours/glitch/components/relative_timestamp'; import DropdownMenu from './containers/dropdown_menu_container'; 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));