From c1e0f085849da22589ec14493e968635b7e3a608 Mon Sep 17 00:00:00 2001 From: Sean Yesmunt Date: Fri, 24 Jan 2020 13:12:22 -0500 Subject: [PATCH] always trigger claim_search when navigating back to homepage --- ui/component/claimTilesDiscover/view.jsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ui/component/claimTilesDiscover/view.jsx b/ui/component/claimTilesDiscover/view.jsx index 38031ef15..10eb1ddf6 100644 --- a/ui/component/claimTilesDiscover/view.jsx +++ b/ui/component/claimTilesDiscover/view.jsx @@ -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);