Remove content visibility + SP search feature flags (#11675)

Co-authored-by: Eric Bailey <git@esb.lol>
This commit is contained in:
Samuel Newman
2026-09-07 10:22:09 +03:00
committed by GitHub
parent c17309943d
commit 3d39ca0c0c
3 changed files with 14 additions and 37 deletions
+10 -24
View File
@@ -56,7 +56,6 @@ let SearchResults = ({
onPageSelected: (page: number) => void
headerHeight: number
}): React.ReactNode => {
const ax = useAnalytics()
const {t: l} = useLingui()
/*
* People/Feeds visibility keys off post-only filters: a `lang` filter applies
@@ -67,10 +66,6 @@ let SearchResults = ({
const activePage = hasPostFilters && activeTab > 1 ? 0 : activeTab
const tabShape = hasPostFilters ? 'filtered' : 'plain'
const isStarterPacksEnabled = ax.features.enabled(
ax.features.SearchStarterPacksV2Enable,
)
const sections = useMemo(() => {
if (!query && !hasFilters) return []
/*
@@ -115,29 +110,20 @@ let SearchResults = ({
<SearchScreenFeedsResults query={query} active={activePage === 3} />
),
},
noFilters &&
isStarterPacksEnabled && {
title: l`Starter Packs`,
component: (
<SearchScreenStarterPackResults
query={query}
active={activePage === 4}
/>
),
},
noFilters && {
title: l`Starter Packs`,
component: (
<SearchScreenStarterPackResults
query={query}
active={activePage === 4}
/>
),
},
].filter(Boolean) as {
title: string
component: React.ReactNode
}[]
}, [
l,
query,
filters,
hasFilters,
hasPostFilters,
activePage,
isStarterPacksEnabled,
])
}, [l, query, filters, hasFilters, hasPostFilters, activePage])
// There may be fewer tabs after changing the search options.
const selectedPage = activePage > sections.length - 1 ? 0 : activePage