forked from
jollywhoppers.com/witchsky.app
Bluesky app fork with some witchin' additions 馃挮
1import {useNavigationState} from '@react-navigation/native'
2
3import {getCurrentRoute} from '#/lib/routes/helpers'
4
5export function useNavigationTabState() {
6 return useNavigationState(state => {
7 let currentRoute = state ? getCurrentRoute(state).name : 'Home'
8 return {
9 isAtHome: currentRoute === 'Home',
10 isAtSearch: currentRoute === 'Search',
11 isAtNotifications: currentRoute === 'Notifications',
12 isAtMyProfile: currentRoute === 'MyProfile',
13 isAtMessages: currentRoute === 'Messages',
14 }
15 })
16}