diff options
Diffstat (limited to 'src/view/screens/ProfileFollows.tsx')
-rw-r--r-- | src/view/screens/ProfileFollows.tsx | 19 |
1 files changed, 10 insertions, 9 deletions
diff --git a/src/view/screens/ProfileFollows.tsx b/src/view/screens/ProfileFollows.tsx index 1cdb5bccf..7edf8edba 100644 --- a/src/view/screens/ProfileFollows.tsx +++ b/src/view/screens/ProfileFollows.tsx @@ -1,20 +1,21 @@ -import React, {useEffect} from 'react' +import React from 'react' import {View} from 'react-native' +import {useFocusEffect} from '@react-navigation/native' +import {NativeStackScreenProps, CommonNavigatorParams} from 'lib/routes/types' import {ViewHeader} from '../com/util/ViewHeader' import {ProfileFollows as ProfileFollowsComponent} from '../com/profile/ProfileFollows' -import {ScreenParams} from '../routes' import {useStores} from 'state/index' -export const ProfileFollows = ({navIdx, visible, params}: ScreenParams) => { +type Props = NativeStackScreenProps<CommonNavigatorParams, 'ProfileFollows'> +export const ProfileFollowsScreen = ({route}: Props) => { const store = useStores() - const {name} = params + const {name} = route.params - useEffect(() => { - if (visible) { - store.nav.setTitle(navIdx, `Followed by ${name}`) + useFocusEffect( + React.useCallback(() => { store.shell.setMinimalShellMode(false) - } - }, [store, visible, name, navIdx]) + }, [store]), + ) return ( <View> |