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 =
|
const shouldPerformSearch =
|
||||||
claimSearchResult === undefined ||
|
!uris &&
|
||||||
didNavigateForward ||
|
(claimSearchResult === undefined ||
|
||||||
(!loading &&
|
didNavigateForward ||
|
||||||
!claimSearchResultLastPageReached &&
|
(!loading &&
|
||||||
claimSearchResult &&
|
!claimSearchResultLastPageReached &&
|
||||||
claimSearchResult.length &&
|
claimSearchResult &&
|
||||||
claimSearchResult.length < dynamicPageSize * options.page &&
|
claimSearchResult.length &&
|
||||||
claimSearchResult.length % dynamicPageSize === 0);
|
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
|
// Don't use the query from createNormalizedClaimSearchKey for the effect since that doesn't include page & release_time
|
||||||
const optionsStringForEffect = JSON.stringify(options);
|
const optionsStringForEffect = JSON.stringify(options);
|
||||||
|
|
Loading…
Reference in a new issue