ClaimListDiscover: if 'uris' is given, there is no need to perform a search
This was causing unnecessary calls that won't be used.
This commit is contained in:
parent
99d8d0dbee
commit
3974ca6322
1 changed files with 9 additions and 8 deletions
|
@ -465,14 +465,15 @@ function ClaimListDiscover(props: Props) {
|
|||
}
|
||||
|
||||
const shouldPerformSearch =
|
||||
claimSearchResult === undefined ||
|
||||
didNavigateForward ||
|
||||
(!loading &&
|
||||
!claimSearchResultLastPageReached &&
|
||||
claimSearchResult &&
|
||||
claimSearchResult.length &&
|
||||
claimSearchResult.length < dynamicPageSize * options.page &&
|
||||
claimSearchResult.length % dynamicPageSize === 0);
|
||||
!uris &&
|
||||
(claimSearchResult === undefined ||
|
||||
didNavigateForward ||
|
||||
(!loading &&
|
||||
!claimSearchResultLastPageReached &&
|
||||
claimSearchResult &&
|
||||
claimSearchResult.length &&
|
||||
claimSearchResult.length < dynamicPageSize * options.page &&
|
||||
claimSearchResult.length % dynamicPageSize === 0));
|
||||
|
||||
// Don't use the query from createNormalizedClaimSearchKey for the effect since that doesn't include page & release_time
|
||||
const optionsStringForEffect = JSON.stringify(options);
|
||||
|
|
Loading…
Reference in a new issue