From e26714e44a67b94a5b844d98d6f961b01793c13d Mon Sep 17 00:00:00 2001 From: Barney Laurance Date: Tue, 17 Dec 2024 11:40:35 +0000 Subject: [PATCH] DON-518: Fix Scrolling in explore page doesn't load more cards Initially tried copying code from the old explore page at https://github.com/thebiggive/donate-frontend/blob/36cc52e9a883fe1e33b013e1515503ee574fb3b7/src/app/explore/explore.component.ts#L162 but that actually just does the same thing as the `doCampaignSearch` function that we already have, so we just need to call that unconditionally for both the campaign and explore pages. Also switched away from the deprecated usage of Observable.subscribe with two params --- src/app/explore/explore.component.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/app/explore/explore.component.ts b/src/app/explore/explore.component.ts index 99612729d..b62c38e02 100644 --- a/src/app/explore/explore.component.ts +++ b/src/app/explore/explore.component.ts @@ -357,6 +357,7 @@ export class ExploreComponent implements AfterViewChecked, OnDestroy, OnInit { } private loadMoreForCurrentSearch() { + console.log("in loadmoreForCurrentSearch"); this.offset += CampaignService.perPage; this.loading = true; const query = this.campaignService.buildQuery( @@ -367,9 +368,7 @@ export class ExploreComponent implements AfterViewChecked, OnDestroy, OnInit { this.fundSlug, ); - if (this.metaCampaign) { - this.doCampaignSearch(query as SearchQuery, false); - } + this.doCampaignSearch(query as SearchQuery, false); } /**