From e430098613e17d91cfba93d2c222dc0f2a05da0f Mon Sep 17 00:00:00 2001 From: Sean Yesmunt Date: Wed, 26 Feb 2020 16:46:46 -0500 Subject: [PATCH] add claim_type changes to ClaimTilesDiscover too --- ui/component/claimTilesDiscover/view.jsx | 9 +++++---- ui/scss/component/_claim-list.scss | 4 ---- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/ui/component/claimTilesDiscover/view.jsx b/ui/component/claimTilesDiscover/view.jsx index 98e98634a..02791c049 100644 --- a/ui/component/claimTilesDiscover/view.jsx +++ b/ui/component/claimTilesDiscover/view.jsx @@ -21,7 +21,7 @@ type Props = { pageSize: number, orderBy?: Array, releaseTime?: string, - claimType?: string, + claimType?: Array, timestamp?: string, }; @@ -54,10 +54,11 @@ function ClaimTilesDiscover(props: Props) { not_tags: Array, order_by: Array, release_time?: string, - claim_type?: string, + claim_type: string, timestamp?: string, } = { page_size: pageSize, + claim_type: claimType || ['stream', 'channel', 'repost'], // no_totals makes it so the sdk doesn't have to calculate total number pages for pagination // it's faster, but we will need to remove it if we start using total_pages no_totals: true, @@ -76,7 +77,7 @@ function ClaimTilesDiscover(props: Props) { } if (!showReposts) { - options.claim_type = 'stream'; + options.claim_type = options.claim_type.filter(claimType => claimType !== 'repost'); } if (claimType) { @@ -89,7 +90,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); diff --git a/ui/scss/component/_claim-list.scss b/ui/scss/component/_claim-list.scss index 882a6e44d..3210fc4bb 100644 --- a/ui/scss/component/_claim-list.scss +++ b/ui/scss/component/_claim-list.scss @@ -116,10 +116,6 @@ height: 5rem; } } - - a { - color: inherit; - } } .claim-preview--large {