Skip to content

Commit

Permalink
fix: remove free/all filter
Browse files Browse the repository at this point in the history
  • Loading branch information
kiram15 committed Sep 27, 2023
1 parent e9221d0 commit ed7000a
Showing 1 changed file with 0 additions and 23 deletions.
23 changes: 0 additions & 23 deletions packages/catalog-search/src/SearchFilters.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,6 @@ export const FREE_ALL_TITLE = 'Free / All';

const SearchFilters = ({ variant }) => {
const { refinements, searchFacetFilters } = useContext(SearchContext);
const freeAllItems = useMemo(() => [
{
label: 'Free to me',
// flip the 1 to 0 or vice versa using boolean logic
// eslint-disable-next-line no-bitwise
value: refinements[SHOW_ALL_NAME] ^ 1,
},
{
label: 'All courses',
value: refinements[SHOW_ALL_NAME],
},
], [refinements[SHOW_ALL_NAME]]);

const searchFacets = useMemo(
() => {
Expand Down Expand Up @@ -60,17 +48,6 @@ const SearchFilters = ({ variant }) => {
));
return (
<>
{features.ENROLL_WITH_CODES && (
<FacetListBase
attribute={SHOW_ALL_NAME}
facetValueType="bool"
isBold
items={freeAllItems}
key={SHOW_ALL_NAME}
title={FREE_ALL_TITLE}
variant={variant}
/>
)}
{filtersFromRefinements}
{features.LEARNING_TYPE_FACET && (<LearningTypeRadioFacet />)}
</>
Expand Down

0 comments on commit ed7000a

Please sign in to comment.