params: PropTypes.object.isRequired,
dispatch: PropTypes.func.isRequired,
accountIds: ImmutablePropTypes.list,
+ hasMore: PropTypes.bool,
};
componentWillMount () {
handleScroll = (e) => {
const { scrollTop, scrollHeight, clientHeight } = e.target;
- if (scrollTop === scrollHeight - clientHeight) {
+ if (scrollTop === scrollHeight - clientHeight && this.props.hasMore) {
this.props.dispatch(expandFollowers(Number(this.props.params.accountId)));
}
}
params: PropTypes.object.isRequired,
dispatch: PropTypes.func.isRequired,
accountIds: ImmutablePropTypes.list,
+ hasMore: PropTypes.bool,
};
componentWillMount () {
handleScroll = (e) => {
const { scrollTop, scrollHeight, clientHeight } = e.target;
- if (scrollTop === scrollHeight - clientHeight) {
+ if (scrollTop === scrollHeight - clientHeight && this.props.hasMore) {
this.props.dispatch(expandFollowing(Number(this.props.params.accountId)));
}
}