logo

mastofe

My custom branche(s) on git.pleroma.social/pleroma/mastofe git clone https://hacktivis.me/git/mastofe.git

load_gap.js (829B)


  1. import React from 'react';
  2. import PropTypes from 'prop-types';
  3. import { injectIntl, defineMessages } from 'react-intl';
  4. const messages = defineMessages({
  5. load_more: { id: 'status.load_more', defaultMessage: 'Load more' },
  6. });
  7. @injectIntl
  8. export default class LoadGap extends React.PureComponent {
  9. static propTypes = {
  10. disabled: PropTypes.bool,
  11. maxId: PropTypes.string,
  12. onClick: PropTypes.func.isRequired,
  13. intl: PropTypes.object.isRequired,
  14. };
  15. handleClick = () => {
  16. this.props.onClick(this.props.maxId);
  17. }
  18. render () {
  19. const { disabled, intl } = this.props;
  20. return (
  21. <button className='load-more load-gap' disabled={disabled} onClick={this.handleClick} aria-label={intl.formatMessage(messages.load_more)}>
  22. <i className='fa fa-ellipsis-h' />
  23. </button>
  24. );
  25. }
  26. }