@@ -2,13 +2,18 @@ import React from 'react'
2
2
import { type AppBskyActorDefs as ActorDefs } from '@atproto/api'
3
3
import { msg } from '@lingui/macro'
4
4
import { useLingui } from '@lingui/react'
5
+ import { useNavigation } from '@react-navigation/native'
5
6
6
7
import { useInitialNumToRender } from '#/lib/hooks/useInitialNumToRender'
8
+ import { type NavigationProp } from '#/lib/routes/types'
7
9
import { cleanError } from '#/lib/strings/errors'
8
10
import { logger } from '#/logger'
11
+ import { isWeb } from '#/platform/detection'
9
12
import { useProfileFollowsQuery } from '#/state/queries/profile-follows'
10
13
import { useResolveDidQuery } from '#/state/queries/resolve-uri'
11
14
import { useSession } from '#/state/session'
15
+ import { useTheme } from '#/alf'
16
+ import { PeopleRemove2_Stroke1_Corner0_Rounded as PeopleRemoveIcon } from '#/components/icons/PeopleRemove2'
12
17
import { ListFooter , ListMaybePlaceholder } from '#/components/Lists'
13
18
import { List } from '../util/List'
14
19
import { ProfileCardWithFollowBtn } from './ProfileCard'
@@ -37,6 +42,17 @@ export function ProfileFollows({name}: {name: string}) {
37
42
const { _} = useLingui ( )
38
43
const initialNumToRender = useInitialNumToRender ( )
39
44
const { currentAccount} = useSession ( )
45
+ const t = useTheme ( )
46
+ const navigation = useNavigation < NavigationProp > ( )
47
+
48
+ const onPressFindAccounts = React . useCallback ( ( ) => {
49
+ if ( isWeb ) {
50
+ navigation . navigate ( 'Search' , { } )
51
+ } else {
52
+ navigation . navigate ( 'SearchTab' )
53
+ navigation . popToTop ( )
54
+ }
55
+ } , [ navigation ] )
40
56
41
57
const [ isPTRing , setIsPTRing ] = React . useState ( false )
42
58
const {
@@ -97,6 +113,16 @@ export function ProfileFollows({name}: {name: string}) {
97
113
errorMessage = { cleanError ( resolveError || error ) }
98
114
onRetry = { isError ? refetch : undefined }
99
115
sideBorders = { false }
116
+ useEmptyState = { true }
117
+ emptyStateIcon = {
118
+ < PeopleRemoveIcon size = "3xl" fill = { t . atoms . text_contrast_low . color } />
119
+ }
120
+ emptyStateButton = { {
121
+ label : _ ( msg `See suggested accounts` ) ,
122
+ text : _ ( msg `See suggested accounts` ) ,
123
+ variant : 'solid' ,
124
+ onPress : onPressFindAccounts ,
125
+ } }
100
126
/>
101
127
)
102
128
}
0 commit comments