From 565cbb2502ce7379a11a8d13a345aa79348a3bfa Mon Sep 17 00:00:00 2001 From: Sean Yesmunt Date: Wed, 26 Feb 2020 16:39:44 -0500 Subject: [PATCH] default claim_type to "stream", "channel", and "repost" --- ui/component/claimListDiscover/view.jsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ui/component/claimListDiscover/view.jsx b/ui/component/claimListDiscover/view.jsx index d23190745..9b970a52d 100644 --- a/ui/component/claimListDiscover/view.jsx +++ b/ui/component/claimListDiscover/view.jsx @@ -52,7 +52,7 @@ type Props = { headerLabel?: string | Node, name?: string, pageSize?: number, - claimType?: string | Array, + claimType?: Array, renderProperties?: Claim => Node, includeSupportAction?: boolean, hideBlock: boolean, @@ -110,6 +110,7 @@ function ClaimListDiscover(props: Props) { page_size: pageSize || PAGE_SIZE, page, name, + 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, @@ -166,7 +167,7 @@ function ClaimListDiscover(props: Props) { } if (!showReposts) { - options.claim_type = 'stream'; + options.claim_type = options.claim_type.filter(claimType => claimType !== 'repost'); } const hasMatureTags = tags && tags.some(t => MATURE_TAGS.includes(t));