Improve reliability of screen titles

This commit is contained in:
Paul Frazee 2022-11-17 16:01:29 -06:00
parent b2160ae159
commit a3bca154c4
16 changed files with 60 additions and 37 deletions

View file

@ -5,13 +5,13 @@ import {ProfileFollowers as ProfileFollowersComponent} from '../com/profile/Prof
import {ScreenParams} from '../routes'
import {useStores} from '../../state'
export const ProfileFollowers = ({visible, params}: ScreenParams) => {
export const ProfileFollowers = ({navIdx, visible, params}: ScreenParams) => {
const store = useStores()
const {name} = params
useEffect(() => {
if (visible) {
store.nav.setTitle(`Followers of ${name}`)
store.nav.setTitle(navIdx, `Followers of ${name}`)
}
}, [store, visible, name])