* WIP * Add shell state * Integrate new shell state for drawer and minimal shell mode * Replace isDrawerSwipeDisabled * Split shell state into separate contexts to avoid needless re-renders * Fix typo --------- Co-authored-by: Paul Frazee <pfrazee@gmail.com>
27 lines
932 B
TypeScript
27 lines
932 B
TypeScript
import React from 'react'
|
|
import {View} from 'react-native'
|
|
import {useFocusEffect} from '@react-navigation/native'
|
|
import {NativeStackScreenProps, CommonNavigatorParams} from 'lib/routes/types'
|
|
import {withAuthRequired} from 'view/com/auth/withAuthRequired'
|
|
import {ViewHeader} from '../com/util/ViewHeader'
|
|
import {ProfileFollows as ProfileFollowsComponent} from '../com/profile/ProfileFollows'
|
|
import {useSetMinimalShellMode} from '#/state/shell'
|
|
|
|
type Props = NativeStackScreenProps<CommonNavigatorParams, 'ProfileFollows'>
|
|
export const ProfileFollowsScreen = withAuthRequired(({route}: Props) => {
|
|
const {name} = route.params
|
|
const setMinimalShellMode = useSetMinimalShellMode()
|
|
|
|
useFocusEffect(
|
|
React.useCallback(() => {
|
|
setMinimalShellMode(false)
|
|
}, [setMinimalShellMode]),
|
|
)
|
|
|
|
return (
|
|
<View>
|
|
<ViewHeader title="Following" />
|
|
<ProfileFollowsComponent name={name} />
|
|
</View>
|
|
)
|
|
})
|