about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorLogan Rosen <loganrosen@gmail.com>2023-05-30 14:55:06 -0400
committerGitHub <noreply@github.com>2023-05-30 13:55:06 -0500
commita89129fcf678195f84b0497573c77614f7def9e6 (patch)
tree96175e32a30afb40add98b445dd70a61758bb104 /src
parent19ea6b6ae7a06dd006e8c0c0ead5a76d431fef60 (diff)
downloadvoidsky-a89129fcf678195f84b0497573c77614f7def9e6.tar.zst
Fix button to find people to follow (#806)
Diffstat (limited to 'src')
-rw-r--r--src/view/com/posts/CustomFeedEmptyState.tsx9
-rw-r--r--src/view/com/posts/FollowingEmptyState.tsx9
2 files changed, 14 insertions, 4 deletions
diff --git a/src/view/com/posts/CustomFeedEmptyState.tsx b/src/view/com/posts/CustomFeedEmptyState.tsx
index e51794e7c..e83a94f03 100644
--- a/src/view/com/posts/CustomFeedEmptyState.tsx
+++ b/src/view/com/posts/CustomFeedEmptyState.tsx
@@ -11,6 +11,7 @@ import {MagnifyingGlassIcon} from 'lib/icons'
 import {NavigationProp} from 'lib/routes/types'
 import {usePalette} from 'lib/hooks/usePalette'
 import {s} from 'lib/styles'
+import {isWeb} from 'platform/detection'
 
 export function CustomFeedEmptyState() {
   const pal = usePalette('default')
@@ -18,8 +19,12 @@ export function CustomFeedEmptyState() {
   const navigation = useNavigation<NavigationProp>()
 
   const onPressFindAccounts = React.useCallback(() => {
-    navigation.navigate('SearchTab')
-    navigation.popToTop()
+    if (isWeb) {
+      navigation.navigate('Search', {})
+    } else {
+      navigation.navigate('SearchTab')
+      navigation.popToTop()
+    }
   }, [navigation])
 
   return (
diff --git a/src/view/com/posts/FollowingEmptyState.tsx b/src/view/com/posts/FollowingEmptyState.tsx
index b37298179..d1843900b 100644
--- a/src/view/com/posts/FollowingEmptyState.tsx
+++ b/src/view/com/posts/FollowingEmptyState.tsx
@@ -11,6 +11,7 @@ import {MagnifyingGlassIcon} from 'lib/icons'
 import {NavigationProp} from 'lib/routes/types'
 import {usePalette} from 'lib/hooks/usePalette'
 import {s} from 'lib/styles'
+import {isWeb} from 'platform/detection'
 
 export function FollowingEmptyState() {
   const pal = usePalette('default')
@@ -18,8 +19,12 @@ export function FollowingEmptyState() {
   const navigation = useNavigation<NavigationProp>()
 
   const onPressFindAccounts = React.useCallback(() => {
-    navigation.navigate('SearchTab')
-    navigation.popToTop()
+    if (isWeb) {
+      navigation.navigate('Search', {})
+    } else {
+      navigation.navigate('SearchTab')
+      navigation.popToTop()
+    }
   }, [navigation])
 
   return (