Patch: Filter out playlists from main channel listing (#6931)
The search wunderbar was lost due to the additional type added
This commit is contained in:
parent
d8c2a8f5bf
commit
03cda16847
1 changed files with 7 additions and 1 deletions
|
@ -14,6 +14,8 @@ import { Form, FormField } from 'component/common/form';
|
||||||
import { DEBOUNCE_WAIT_DURATION_MS } from 'constants/search';
|
import { DEBOUNCE_WAIT_DURATION_MS } from 'constants/search';
|
||||||
import { lighthouse } from 'redux/actions/search';
|
import { lighthouse } from 'redux/actions/search';
|
||||||
|
|
||||||
|
const TYPES_TO_ALLOW_FILTER = ['stream', 'repost'];
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
uri: string,
|
uri: string,
|
||||||
totalPages: number,
|
totalPages: number,
|
||||||
|
@ -62,7 +64,11 @@ function ChannelContent(props: Props) {
|
||||||
} = useHistory();
|
} = useHistory();
|
||||||
const url = `${pathname}${search}`;
|
const url = `${pathname}${search}`;
|
||||||
const claimId = claim && claim.claim_id;
|
const claimId = claim && claim.claim_id;
|
||||||
const showFilters = !claimType || claimType === 'stream';
|
const showFilters =
|
||||||
|
!claimType ||
|
||||||
|
(Array.isArray(claimType)
|
||||||
|
? claimType.every((ct) => TYPES_TO_ALLOW_FILTER.includes(ct))
|
||||||
|
: TYPES_TO_ALLOW_FILTER.includes(claimType));
|
||||||
|
|
||||||
function handleInputChange(e) {
|
function handleInputChange(e) {
|
||||||
const { value } = e.target;
|
const { value } = e.target;
|
||||||
|
|
Loading…
Reference in a new issue