|
@ -18,6 +18,7 @@ const messages = defineMessages({ |
|
|
|
|
|
|
|
|
const mapStateToProps = state => ({ |
|
|
const mapStateToProps = state => ({ |
|
|
accountIds: state.getIn(['user_lists', 'follow_requests', 'items']), |
|
|
accountIds: state.getIn(['user_lists', 'follow_requests', 'items']), |
|
|
|
|
|
hasMore: !!state.getIn(['user_lists', 'follow_requests', 'next']), |
|
|
}); |
|
|
}); |
|
|
|
|
|
|
|
|
export default @connect(mapStateToProps) |
|
|
export default @connect(mapStateToProps) |
|
@ -28,6 +29,7 @@ class FollowRequests extends ImmutablePureComponent { |
|
|
params: PropTypes.object.isRequired, |
|
|
params: PropTypes.object.isRequired, |
|
|
dispatch: PropTypes.func.isRequired, |
|
|
dispatch: PropTypes.func.isRequired, |
|
|
shouldUpdateScroll: PropTypes.func, |
|
|
shouldUpdateScroll: PropTypes.func, |
|
|
|
|
|
hasMore: PropTypes.bool, |
|
|
accountIds: ImmutablePropTypes.list, |
|
|
accountIds: ImmutablePropTypes.list, |
|
|
intl: PropTypes.object.isRequired, |
|
|
intl: PropTypes.object.isRequired, |
|
|
}; |
|
|
}; |
|
@ -41,7 +43,7 @@ class FollowRequests extends ImmutablePureComponent { |
|
|
}, 300, { leading: true }); |
|
|
}, 300, { leading: true }); |
|
|
|
|
|
|
|
|
render () { |
|
|
render () { |
|
|
const { intl, shouldUpdateScroll, accountIds } = this.props; |
|
|
|
|
|
|
|
|
const { intl, shouldUpdateScroll, accountIds, hasMore } = this.props; |
|
|
|
|
|
|
|
|
if (!accountIds) { |
|
|
if (!accountIds) { |
|
|
return ( |
|
|
return ( |
|
@ -59,6 +61,7 @@ class FollowRequests extends ImmutablePureComponent { |
|
|
<ScrollableList |
|
|
<ScrollableList |
|
|
scrollKey='follow_requests' |
|
|
scrollKey='follow_requests' |
|
|
onLoadMore={this.handleLoadMore} |
|
|
onLoadMore={this.handleLoadMore} |
|
|
|
|
|
hasMore={hasMore} |
|
|
shouldUpdateScroll={shouldUpdateScroll} |
|
|
shouldUpdateScroll={shouldUpdateScroll} |
|
|
emptyMessage={emptyMessage} |
|
|
emptyMessage={emptyMessage} |
|
|
> |
|
|
> |
|
|