Merge branch 'fix-has-more-in-search' into 'main'

fix: set hasMore trending statuses inside its own if statement

See merge request soapbox-pub/soapbox!3186
This commit is contained in:
Alex Gleason 2024-10-23 21:41:43 +00:00
commit 50760e0bff
1 changed files with 2 additions and 1 deletions

View File

@ -160,6 +160,7 @@ const SearchResults = () => {
));
resultsIds = results.statuses;
} else if (!submitted && trendingStatuses && !trendingStatuses.isEmpty()) {
hasMore = !!nextTrendingStatuses;
searchResults = trendingStatuses.map((statusId: string) => (
// @ts-ignore
<StatusContainer
@ -231,7 +232,7 @@ const SearchResults = () => {
scrollKey={`${selectedFilter}:${value}`}
isLoading={submitted && !loaded}
showLoading={submitted && !loaded && searchResults?.isEmpty()}
hasMore={(!!nextTrendingStatuses) || hasMore}
hasMore={hasMore}
onLoadMore={handleLoadMore}
placeholderComponent={placeholderComponent}
placeholderCount={20}