From e51921a5ba96151963a09c41bc94169a77aacef0 Mon Sep 17 00:00:00 2001 From: Thomas Kranitsas Date: Thu, 7 Feb 2019 11:47:35 +0200 Subject: [PATCH] fix lazy-load in review opp bucket --- src/shared/actions/challenge-listing/index.js | 2 +- .../challenge-listing/Listing/ReviewOpportunityBucket/index.jsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/shared/actions/challenge-listing/index.js b/src/shared/actions/challenge-listing/index.js index 72333035ab..fa1cb8e21d 100644 --- a/src/shared/actions/challenge-listing/index.js +++ b/src/shared/actions/challenge-listing/index.js @@ -24,7 +24,7 @@ const PAGE_SIZE = 50; /** * The maximum number of review opportunities to fetch in a single API call. */ -const REVIEW_OPPORTUNITY_PAGE_SIZE = 10; +const REVIEW_OPPORTUNITY_PAGE_SIZE = 1000; /** * Private. Loads from the backend all challenges matching some conditions. diff --git a/src/shared/components/challenge-listing/Listing/ReviewOpportunityBucket/index.jsx b/src/shared/components/challenge-listing/Listing/ReviewOpportunityBucket/index.jsx index 2a1dd46b23..87cb5eef0a 100644 --- a/src/shared/components/challenge-listing/Listing/ReviewOpportunityBucket/index.jsx +++ b/src/shared/components/challenge-listing/Listing/ReviewOpportunityBucket/index.jsx @@ -62,7 +62,7 @@ export default function ReviewOpportunityBucket({ )); const placeholders = []; - if (loading || keepPlaceholders) { + if ((loading || keepPlaceholders) && cards.length === 0) { for (let i = 0; i < 8; i += 1) { placeholders.push(); }