f6769b283f
* WIP * WIP * Fix header offset on web * Remove debug * Fix web mobile feed and FAB layout * Fix modals on mobile web * Remove dead code * Remove ios config that shouldnt be committed now * Move bottom bar into its own folder * Fix web drawer navigation and state behaviors * Remove dark mode toggle from web drawer for now * Fix search on mobile web * Fix the logged out splash screen on mobile web * Fixes to detox simulator --------- Co-authored-by: Paul Frazee <pfrazee@gmail.com>
14 lines
450 B
TypeScript
14 lines
450 B
TypeScript
import {useNavigationState} from '@react-navigation/native'
|
|
import {getTabState, TabState} from 'lib/routes/helpers'
|
|
|
|
export function useNavigationTabState() {
|
|
return useNavigationState(state => {
|
|
return {
|
|
isAtHome: getTabState(state, 'Home') !== TabState.Outside,
|
|
isAtSearch: getTabState(state, 'Search') !== TabState.Outside,
|
|
isAtNotifications:
|
|
getTabState(state, 'Notifications') !== TabState.Outside,
|
|
}
|
|
})
|
|
}
|