import { RouteProp, useNavigation, useRoute } from '@react-navigation/native'; import { StackNavigationProp } from '@react-navigation/stack'; import { TNavigation } from '../../stacks/stackType'; import { AdminPanelStackParamList, ChatsStackParamList, DisplayPrefStackParamList, DrawerParamList, E2EEnterYourPasswordStackParamList, E2ESaveYourPasswordStackParamList, InsideStackParamList, NewMessageStackParamList, OutsideModalParamList, OutsideParamList, ProfileStackParamList, SettingsStackParamList } from '../../stacks/types'; type TRoutes = | ChatsStackParamList | ProfileStackParamList | SettingsStackParamList | AdminPanelStackParamList | DisplayPrefStackParamList | DrawerParamList | NewMessageStackParamList | E2ESaveYourPasswordStackParamList | E2EEnterYourPasswordStackParamList | InsideStackParamList | OutsideParamList | OutsideModalParamList | TNavigation; export function useAppNavigation() { const navigation = useNavigation>(); return navigation; } export function useAppRoute() { const route = useRoute>(); return route; }