use limit_claims_per_channel on homepage
This commit is contained in:
parent
17feef93df
commit
84084a7c41
2 changed files with 12 additions and 0 deletions
|
@ -25,6 +25,7 @@ type Props = {
|
|||
claimType?: Array<string>,
|
||||
timestamp?: string,
|
||||
feeAmount?: string,
|
||||
limitClaimsPerChannel?: number,
|
||||
};
|
||||
|
||||
function ClaimTilesDiscover(props: Props) {
|
||||
|
@ -45,6 +46,7 @@ function ClaimTilesDiscover(props: Props) {
|
|||
prefixUris,
|
||||
timestamp,
|
||||
feeAmount,
|
||||
limitClaimsPerChannel,
|
||||
} = props;
|
||||
const { location } = useHistory();
|
||||
const urlParams = new URLSearchParams(location.search);
|
||||
|
@ -64,6 +66,7 @@ function ClaimTilesDiscover(props: Props) {
|
|||
claim_type?: Array<string>,
|
||||
timestamp?: string,
|
||||
fee_amount?: string,
|
||||
limit_claims_per_channel?: number,
|
||||
} = {
|
||||
page_size: pageSize,
|
||||
claim_type: claimType || undefined,
|
||||
|
@ -88,6 +91,10 @@ function ClaimTilesDiscover(props: Props) {
|
|||
options.fee_amount = feeAmountParam;
|
||||
}
|
||||
|
||||
if (limitClaimsPerChannel) {
|
||||
options.limit_claims_per_channel = limitClaimsPerChannel;
|
||||
}
|
||||
|
||||
// https://github.com/lbryio/lbry-desktop/issues/3774
|
||||
if (hideReposts) {
|
||||
if (Array.isArray(options.claim_type)) {
|
||||
|
|
|
@ -116,6 +116,7 @@ export default function getHomePageRowData(
|
|||
orderBy: ['release_time'],
|
||||
pageSize: 12,
|
||||
channelIds: YOUTUBER_CHANNEL_IDS,
|
||||
limitClaimsPerChannel: 1,
|
||||
releaseTime: `>${Math.floor(
|
||||
moment()
|
||||
.subtract(1, 'months')
|
||||
|
@ -173,6 +174,7 @@ export default function getHomePageRowData(
|
|||
pageSize: showPersonalizedChannels || showPersonalizedTags ? 4 : 8,
|
||||
orderBy: ['effective_amount'],
|
||||
claimType: ['stream'],
|
||||
limitClaimsPerChannel: 2,
|
||||
releaseTime: `>${Math.floor(
|
||||
moment()
|
||||
.subtract(1, 'day')
|
||||
|
@ -189,6 +191,7 @@ export default function getHomePageRowData(
|
|||
claimType: ['stream'],
|
||||
tags: ['2020protests'],
|
||||
pageSize: 4,
|
||||
limitClaimsPerChannel: 1,
|
||||
},
|
||||
};
|
||||
|
||||
|
@ -207,6 +210,7 @@ export default function getHomePageRowData(
|
|||
options: {
|
||||
pageSize: 4,
|
||||
claimType: ['stream'],
|
||||
limitClaimsPerChannel: 1,
|
||||
releaseTime: `<${Math.floor(
|
||||
moment()
|
||||
.subtract(6, 'month')
|
||||
|
@ -230,6 +234,7 @@ export default function getHomePageRowData(
|
|||
options: {
|
||||
tags: followedTags.map(tag => tag.name),
|
||||
claimType: ['stream'],
|
||||
limitClaimsPerChannel: 2,
|
||||
},
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue