From ffd2c4f793b199a75a14c767ac7b13194916fe80 Mon Sep 17 00:00:00 2001 From: Sean Yesmunt Date: Fri, 28 Feb 2020 16:52:42 -0500 Subject: [PATCH] hide claimList filters on channel discovery and sign in pages --- ui/component/claimListDiscover/view.jsx | 19 +++++++++++-------- ui/component/userChannelFollowIntro/view.jsx | 1 + ui/page/channelsFollowingDiscover/view.jsx | 7 ++++++- ui/page/discover/view.jsx | 2 +- 4 files changed, 19 insertions(+), 10 deletions(-) diff --git a/ui/component/claimListDiscover/view.jsx b/ui/component/claimListDiscover/view.jsx index fcff3e8d2..2e83eaf6a 100644 --- a/ui/component/claimListDiscover/view.jsx +++ b/ui/component/claimListDiscover/view.jsx @@ -41,13 +41,14 @@ type Props = { headerLabel?: string | Node, name?: string, hideBlock?: boolean, - claimType?: string | Array, - defaultClaimType?: string | Array, + hideFilter?: boolean, + claimType?: Array, + defaultClaimType?: Array, streamType?: string | Array, defaultStreamType?: string | Array, renderProperties?: Claim => Node, includeSupportAction?: boolean, - noCustom?: boolean, + pageSize?: number, }; function ClaimListDiscover(props: Props) { @@ -79,7 +80,7 @@ function ClaimListDiscover(props: Props) { defaultFreshness = CS.FRESH_WEEK, renderProperties, includeSupportAction, - noCustom, + hideFilter, } = props; const didNavigateForward = history.action === 'PUSH'; const { search } = location; @@ -118,9 +119,7 @@ function ClaimListDiscover(props: Props) { release_time?: string, claim_type?: Array, name?: string, - claim_type?: Array, duration?: string, - claim_type?: string | Array, stream_types?: any, } = { page_size: pageSize || CS.PAGE_SIZE, @@ -196,7 +195,11 @@ function ClaimListDiscover(props: Props) { if (claimTypeParam) { if (claimTypeParam !== CS.CONTENT_ALL) { - options.claim_type = [claimTypeParam]; + if (Array.isArray(claimTypeParam)) { + options.claim_type = claimTypeParam; + } else { + options.claim_type = [claimTypeParam]; + } } } @@ -329,7 +332,7 @@ function ClaimListDiscover(props: Props) { ))}
- {!noCustom && ( + {!hideFilter && (