diff --git a/.flowconfig b/.flowconfig index b6992488b..246a00038 100644 --- a/.flowconfig +++ b/.flowconfig @@ -16,6 +16,7 @@ suppress_comment=\\(.\\|\n\\)*\\$FlowFixMe suppress_comment=\\(.\\|\n\\)*\\$FlowIssue module.name_mapper='^constants\(.*\)$' -> '/ui/constants\1' +module.name_mapper='^contexts\(.*\)$' -> '/ui/contexts\1' module.name_mapper='^util\(.*\)$' -> '/ui/util\1' module.name_mapper='^redux\(.*\)$' -> '/ui/redux\1' module.name_mapper='^types\(.*\)$' -> '/ui/types\1' diff --git a/ui/component/claimListHeader/view.jsx b/ui/component/claimListHeader/view.jsx index 978423210..b6ba05bb3 100644 --- a/ui/component/claimListHeader/view.jsx +++ b/ui/component/claimListHeader/view.jsx @@ -11,6 +11,7 @@ import { FormField } from 'component/common/form'; import Button from 'component/button'; import { toCapitalCase } from 'util/string'; import SEARCHABLE_LANGUAGES from 'constants/searchable_languages'; +import { ClaimSearchFilterContext } from 'contexts/claimSearchFilterContext'; type Props = { defaultTags: string, @@ -62,6 +63,7 @@ function ClaimListHeader(props: Props) { languageSetting, scrollAnchor, } = props; + const filterCtx = React.useContext(ClaimSearchFilterContext); const { action, push, location } = useHistory(); const { search } = location; const [expanded, setExpanded] = usePersistedState(`expanded-${location.pathname}`, false); @@ -345,7 +347,7 @@ function ClaimListHeader(props: Props) { }) } > - {CS.CONTENT_TYPES.map((type) => { + {filterCtx.contentTypes.map((type) => { if (type !== CS.CLAIM_CHANNEL || (type === CS.CLAIM_CHANNEL && !channelIdsParam)) { return (