Skip to content

Commit

Permalink
DON-518: Fix Scrolling in explore page doesn't load more cards
Browse files Browse the repository at this point in the history
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
  • Loading branch information
bdsl committed Dec 17, 2024
1 parent 1ba9fd7 commit e26714e
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/app/explore/explore.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -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);
}

/**
Expand Down

0 comments on commit e26714e

Please sign in to comment.