only pass not_channel_ids if there are no channel_ids passed in to claim_search

This commit is contained in:
Sean Yesmunt 2020-01-24 15:43:07 -05:00
parent 7a9fd8488b
commit e0a04afea4
2 changed files with 6 additions and 2 deletions

View file

@ -91,7 +91,9 @@ function ClaimListDiscover(props: Props) {
no_totals: true,
any_tags: tags || [],
channel_ids: channelIds || [],
not_channel_ids: hiddenUris && hiddenUris.length ? hiddenUris.map(hiddenUri => hiddenUri.split('#')[1]) : [],
not_channel_ids:
// If channelIds were passed in, we don't need not_channel_ids
!channelIds && hiddenUris && hiddenUris.length ? hiddenUris.map(hiddenUri => hiddenUri.split('#')[1]) : [],
not_tags: !showNsfw ? MATURE_TAGS : [],
order_by:
typeSort === TYPE_TRENDING

View file

@ -60,7 +60,9 @@ function ClaimTilesDiscover(props: Props) {
any_tags: tags || [],
not_tags: !showNsfw ? MATURE_TAGS : [],
channel_ids: channelIds || [],
not_channel_ids: hiddenUris && hiddenUris.length ? hiddenUris.map(hiddenUri => hiddenUri.split('#')[1]) : [],
not_channel_ids:
// If channelIds were passed in, we don't need not_channel_ids
!channelIds && hiddenUris && hiddenUris.length ? hiddenUris.map(hiddenUri => hiddenUri.split('#')[1]) : [],
order_by: orderBy || ['trending_group', 'trending_mixed'],
};