add claim_type changes to ClaimTilesDiscover too
This commit is contained in:
parent
565cbb2502
commit
e430098613
2 changed files with 5 additions and 8 deletions
|
@ -21,7 +21,7 @@ type Props = {
|
||||||
pageSize: number,
|
pageSize: number,
|
||||||
orderBy?: Array<string>,
|
orderBy?: Array<string>,
|
||||||
releaseTime?: string,
|
releaseTime?: string,
|
||||||
claimType?: string,
|
claimType?: Array<string>,
|
||||||
timestamp?: string,
|
timestamp?: string,
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -54,10 +54,11 @@ function ClaimTilesDiscover(props: Props) {
|
||||||
not_tags: Array<string>,
|
not_tags: Array<string>,
|
||||||
order_by: Array<string>,
|
order_by: Array<string>,
|
||||||
release_time?: string,
|
release_time?: string,
|
||||||
claim_type?: string,
|
claim_type: string,
|
||||||
timestamp?: string,
|
timestamp?: string,
|
||||||
} = {
|
} = {
|
||||||
page_size: pageSize,
|
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
|
// 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
|
// it's faster, but we will need to remove it if we start using total_pages
|
||||||
no_totals: true,
|
no_totals: true,
|
||||||
|
@ -76,7 +77,7 @@ function ClaimTilesDiscover(props: Props) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!showReposts) {
|
if (!showReposts) {
|
||||||
options.claim_type = 'stream';
|
options.claim_type = options.claim_type.filter(claimType => claimType !== 'repost');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (claimType) {
|
if (claimType) {
|
||||||
|
@ -89,7 +90,7 @@ function ClaimTilesDiscover(props: Props) {
|
||||||
|
|
||||||
const claimSearchCacheQuery = createNormalizedClaimSearchKey(options);
|
const claimSearchCacheQuery = createNormalizedClaimSearchKey(options);
|
||||||
const uris = claimSearchByQuery[claimSearchCacheQuery] || [];
|
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
|
// 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);
|
||||||
|
|
||||||
|
|
|
@ -116,10 +116,6 @@
|
||||||
height: 5rem;
|
height: 5rem;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
a {
|
|
||||||
color: inherit;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.claim-preview--large {
|
.claim-preview--large {
|
||||||
|
|
Loading…
Reference in a new issue