Ungate Top/Latest search (#3627)
parent
c42a557417
commit
ade2ea6172
|
@ -5,7 +5,6 @@ export type Gate =
|
|||
| 'disable_poll_on_discover_v2'
|
||||
| 'hide_vertical_scroll_indicators'
|
||||
| 'new_profile_scroll_component'
|
||||
| 'new_search'
|
||||
| 'receive_updates'
|
||||
| 'show_follow_back_label_v2'
|
||||
| 'start_session_with_following_v2'
|
||||
|
|
|
@ -407,7 +407,6 @@ export function SearchScreenInner({
|
|||
const {isDesktop} = useWebMediaQueries()
|
||||
const [activeTab, setActiveTab] = React.useState(0)
|
||||
const {_} = useLingui()
|
||||
const gate = useGate()
|
||||
|
||||
const onPageSelected = React.useCallback(
|
||||
(index: number) => {
|
||||
|
@ -420,7 +419,6 @@ export function SearchScreenInner({
|
|||
|
||||
const sections = React.useMemo(() => {
|
||||
if (!query) return []
|
||||
if (gate('new_search')) {
|
||||
if (hasSession) {
|
||||
return [
|
||||
{
|
||||
|
@ -460,34 +458,7 @@ export function SearchScreenInner({
|
|||
},
|
||||
]
|
||||
}
|
||||
} else {
|
||||
if (hasSession) {
|
||||
return [
|
||||
{
|
||||
title: _(msg`Posts`),
|
||||
component: (
|
||||
<SearchScreenPostResults query={query} active={activeTab === 0} />
|
||||
),
|
||||
},
|
||||
{
|
||||
title: _(msg`Users`),
|
||||
component: (
|
||||
<SearchScreenUserResults query={query} active={activeTab === 1} />
|
||||
),
|
||||
},
|
||||
]
|
||||
} else {
|
||||
return [
|
||||
{
|
||||
title: _(msg`Users`),
|
||||
component: (
|
||||
<SearchScreenUserResults query={query} active={activeTab === 0} />
|
||||
),
|
||||
},
|
||||
]
|
||||
}
|
||||
}
|
||||
}, [hasSession, gate, _, query, activeTab])
|
||||
}, [hasSession, _, query, activeTab])
|
||||
|
||||
if (hasSession) {
|
||||
return query ? (
|
||||
|
|
Loading…
Reference in New Issue