diff options
author | Eric Bailey <git@esb.lol> | 2025-04-08 17:08:09 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-04-08 17:08:09 -0500 |
commit | c8568e3004831e76b29e0f710805cb4f1cfc7576 (patch) | |
tree | b09a3d51996a9ed6924520d150786a4b16aeb98f /src/screens/Search/modules/ExploreSuggestedAccounts.tsx | |
parent | 09111ef272f04bbd6a1d7e43f072fdde06133669 (diff) | |
download | voidsky-c8568e3004831e76b29e0f710805cb4f1cfc7576.tar.zst |
[Explore] Reduced experience (#8160)
* Only show suggested users for non-english users * Fall back to searching for users for non-english speakers * Disable other queries if full experience is disabled * Bump package * If no content langs, use full exp
Diffstat (limited to 'src/screens/Search/modules/ExploreSuggestedAccounts.tsx')
-rw-r--r-- | src/screens/Search/modules/ExploreSuggestedAccounts.tsx | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/src/screens/Search/modules/ExploreSuggestedAccounts.tsx b/src/screens/Search/modules/ExploreSuggestedAccounts.tsx index 8d66dfbc1..f91877143 100644 --- a/src/screens/Search/modules/ExploreSuggestedAccounts.tsx +++ b/src/screens/Search/modules/ExploreSuggestedAccounts.tsx @@ -58,9 +58,11 @@ export function useLoadEnoughProfiles({ export function SuggestedAccountsTabBar({ selectedInterest, onSelectInterest, + hideDefaultTab, }: { selectedInterest: string | null onSelectInterest: (interest: string | null) => void + hideDefaultTab?: boolean }) { const {_} = useLingui() const interestsDisplayNames = useInterestsDisplayNames() @@ -72,8 +74,10 @@ export function SuggestedAccountsTabBar({ return ( <BlockDrawerGesture> <Tabs - interests={['all', ...interests]} - selectedInterest={selectedInterest || 'all'} + interests={hideDefaultTab ? interests : ['all', ...interests]} + selectedInterest={ + selectedInterest || (hideDefaultTab ? interests[0] : 'all') + } onSelectTab={tab => { logger.metric( 'explore:suggestedAccounts:tabPressed', @@ -83,10 +87,14 @@ export function SuggestedAccountsTabBar({ onSelectInterest(tab === 'all' ? null : tab) }} hasSearchText={false} - interestsDisplayNames={{ - all: _(msg`For You`), - ...interestsDisplayNames, - }} + interestsDisplayNames={ + hideDefaultTab + ? interestsDisplayNames + : { + all: _(msg`For You`), + ...interestsDisplayNames, + } + } TabComponent={Tab} contentContainerStyle={[ { |