diff options
author | ThibG <thib@sitedethib.com> | 2019-07-17 16:56:10 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-07-17 16:56:10 +0200 |
commit | e9cc17bbeab1f1d47b5a919adb0ae7eae4eee791 (patch) | |
tree | 21f25d570ea6f57d58c24eec6e65aab8b96f816b /app/javascript/flavours/glitch/components/load_pending.js | |
parent | 5ccd011cc3bafc00a557dabbb47da004f3d4a381 (diff) | |
parent | e91bf82083ac390a0cf229d8e94fa412fdec57ff (diff) |
Merge pull request #1164 from ThibG/glitch-soc/cherry-pick-upstream
Cherry-pick changes from upstream
Diffstat (limited to 'app/javascript/flavours/glitch/components/load_pending.js')
-rw-r--r-- | app/javascript/flavours/glitch/components/load_pending.js | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/app/javascript/flavours/glitch/components/load_pending.js b/app/javascript/flavours/glitch/components/load_pending.js new file mode 100644 index 000000000..7e2702403 --- /dev/null +++ b/app/javascript/flavours/glitch/components/load_pending.js @@ -0,0 +1,22 @@ +import React from 'react'; +import { FormattedMessage } from 'react-intl'; +import PropTypes from 'prop-types'; + +export default class LoadPending extends React.PureComponent { + + static propTypes = { + onClick: PropTypes.func, + count: PropTypes.number, + } + + render() { + const { count } = this.props; + + return ( + <button className='load-more load-gap' onClick={this.props.onClick}> + <FormattedMessage id='load_pending' defaultMessage='{count, plural, one {# new item} other {# new items}}' values={{ count }} /> + </button> + ); + } + +} |