diff options
Diffstat (limited to 'app/javascript/mastodon/features/follow_requests/index.js')
-rw-r--r-- | app/javascript/mastodon/features/follow_requests/index.js | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/app/javascript/mastodon/features/follow_requests/index.js b/app/javascript/mastodon/features/follow_requests/index.js index c88de48c0..9d1aef7cf 100644 --- a/app/javascript/mastodon/features/follow_requests/index.js +++ b/app/javascript/mastodon/features/follow_requests/index.js @@ -21,16 +21,18 @@ const mapStateToProps = state => ({ class FollowRequests extends ImmutablePureComponent { - constructor (props, context) { - super(props, context); - this.handleScroll = this.handleScroll.bind(this); - } + static propTypes = { + params: PropTypes.object.isRequired, + dispatch: PropTypes.func.isRequired, + accountIds: ImmutablePropTypes.list, + intl: PropTypes.object.isRequired + }; componentWillMount () { this.props.dispatch(fetchFollowRequests()); } - handleScroll (e) { + handleScroll = (e) => { const { scrollTop, scrollHeight, clientHeight } = e.target; if (scrollTop === scrollHeight - clientHeight) { @@ -62,13 +64,7 @@ class FollowRequests extends ImmutablePureComponent { </Column> ); } -} -FollowRequests.propTypes = { - params: PropTypes.object.isRequired, - dispatch: PropTypes.func.isRequired, - accountIds: ImmutablePropTypes.list, - intl: PropTypes.object.isRequired -}; +} export default connect(mapStateToProps)(injectIntl(FollowRequests)); |