From e58af0428775d6e8f98ce86cbb626e0abf6fa78b Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Sat, 16 Feb 2019 11:56:09 +0100 Subject: [Glitch] Fix mutes, blocks, domain blocks and follow requests not paginating Port ea7ad59af20af2aa6817b3b40dca34c8fba3373a to glitch-soc Signed-off-by: Thibaut Girka --- app/javascript/flavours/glitch/features/domain_blocks/index.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'app/javascript/flavours/glitch/features/domain_blocks/index.js') diff --git a/app/javascript/flavours/glitch/features/domain_blocks/index.js b/app/javascript/flavours/glitch/features/domain_blocks/index.js index 8b5496139..f7d93a48e 100644 --- a/app/javascript/flavours/glitch/features/domain_blocks/index.js +++ b/app/javascript/flavours/glitch/features/domain_blocks/index.js @@ -19,6 +19,7 @@ const messages = defineMessages({ const mapStateToProps = state => ({ domains: state.getIn(['domain_lists', 'blocks', 'items']), + hasMore: !!state.getIn(['domain_lists', 'blocks', 'next']), }); @connect(mapStateToProps) @@ -28,6 +29,7 @@ export default class Blocks extends ImmutablePureComponent { static propTypes = { params: PropTypes.object.isRequired, dispatch: PropTypes.func.isRequired, + hasMore: PropTypes.bool, domains: ImmutablePropTypes.list, intl: PropTypes.object.isRequired, }; @@ -41,7 +43,7 @@ export default class Blocks extends ImmutablePureComponent { }, 300, { leading: true }); render () { - const { intl, domains } = this.props; + const { intl, domains, hasMore } = this.props; if (!domains) { return ( @@ -59,6 +61,7 @@ export default class Blocks extends ImmutablePureComponent { {domains.map(domain => -- cgit