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

@ -7,13 +7,13 @@ import {ScreenParams} from '../routes'
import {useStores} from '../../state'
import {colors} from '../lib/styles'
export const Search = ({visible, params}: ScreenParams) => {
export const Search = ({navIdx, visible, params}: ScreenParams) => {
const store = useStores()
const {name} = params
useEffect(() => {
if (visible) {
store.nav.setTitle(`Search`)
store.nav.setTitle(navIdx, `Search`)
}
}, [store, visible, name])
const onComposePress = () => {