always trigger claim_search when navigating back to homepage

This commit is contained in:
Sean Yesmunt 2020-01-24 13:12:22 -05:00
parent fab7dfdb41
commit c1e0f08584

View file

@ -40,7 +40,6 @@ function ClaimTilesDiscover(props: Props) {
timestamp,
} = props;
const [hasSearched, setHasSearched] = React.useState(false);
const options: {
page_size: number,
no_totals: boolean,
@ -78,7 +77,7 @@ function ClaimTilesDiscover(props: Props) {
const claimSearchCacheQuery = createNormalizedClaimSearchKey(options);
const uris = claimSearchByQuery[claimSearchCacheQuery] || [];
const shouldPerformSearch = !hasSearched && (uris.length === 0 || (!loading && uris.length < pageSize));
const shouldPerformSearch = !hasSearched || (uris.length === 0 || (!loading && uris.length < pageSize));
// Don't use the query from createNormalizedClaimSearchKey for the effect since that doesn't include page & release_time
const optionsStringForEffect = JSON.stringify(options);