Implement working screen-state management and remove extraneous loads
This commit is contained in:
parent
346385ce43
commit
bb51af5ae9
14 changed files with 118 additions and 245 deletions
|
@ -1,24 +1,17 @@
|
|||
import React, {useLayoutEffect} from 'react'
|
||||
import {TouchableOpacity} from 'react-native'
|
||||
import {FontAwesomeIcon} from '@fortawesome/react-native-fontawesome'
|
||||
import React, {useEffect} from 'react'
|
||||
import {ProfileFollowers as ProfileFollowersComponent} from '../com/profile/ProfileFollowers'
|
||||
import {ScreenParams} from '../routes'
|
||||
import {useStores} from '../../state'
|
||||
|
||||
export const ProfileFollowers = ({params}: ScreenParams) => {
|
||||
export const ProfileFollowers = ({visible, params}: ScreenParams) => {
|
||||
const store = useStores()
|
||||
const {name} = params
|
||||
|
||||
// TODO
|
||||
// useLayoutEffect(() => {
|
||||
// navigation.setOptions({
|
||||
// headerShown: true,
|
||||
// headerTitle: 'Followers',
|
||||
// headerLeft: () => (
|
||||
// <TouchableOpacity onPress={() => navigation.goBack()}>
|
||||
// <FontAwesomeIcon icon="arrow-left" />
|
||||
// </TouchableOpacity>
|
||||
// ),
|
||||
// })
|
||||
// }, [navigation])
|
||||
useEffect(() => {
|
||||
if (visible) {
|
||||
store.nav.setTitle('Followers of')
|
||||
}
|
||||
}, [store, visible])
|
||||
|
||||
return <ProfileFollowersComponent name={name} />
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue