import { HeaderLeft } from '@components/Header' import { Message } from '@components/Message' import { useNavigationState } from '@react-navigation/native' import { createNativeStackNavigator } from '@react-navigation/native-stack' import { TabMePreferencesStackParamList, TabMeStackScreenProps } from '@utils/navigation/navigators' import React, { useEffect, useRef } from 'react' import { useTranslation } from 'react-i18next' import FlashMessage from 'react-native-flash-message' import TabMePreferencesFilter from './Filter' import TabMePreferencesFilters from './Filters' import TabMePreferencesRoot from './Root' const Stack = createNativeStackNavigator() const TabMePreferences: React.FC> = ({ navigation }) => { const { t } = useTranslation('screenTabs') const messageRef = useRef(null) const isNested = (useNavigationState( state => state.routes.find(route => route.name === 'Tab-Me-Preferences')?.state?.routes.length ) || 0) > 1 useEffect(() => { navigation.setOptions({ gestureEnabled: !isNested }) }, [isNested]) return ( <> ( navigation.goBack()} /> ) }} > {props => } {props => } ) } export default TabMePreferences