Issue in Drawer Navigation

16 views Asked by At

I am using react-native for making a mobile application and I happened to make a drawer component , but this prompts me this error enter image description here I have made another navigation which runs fine , I dont know why drawer navigation is making issues . I have attached the error . i would really appreaciate if you can help me . Below is my app.js and drawerNavigator

//React imports
import 'react-native-gesture-handler';
import { NavigationContainer } from '@react-navigation/native';
import { SafeAreaView, ScrollView, View } from 'react-native';

//navigation Import 
import OuterTabs from './navigations/outernavigator/Navigator.jsx';

//icons import
import { EllipseIcon,TopEllipseIcon } from './assets/svgs/index.js';

//styles import 
import AppStyles from './styles/Styles.jsx';
import HomeNavigator from './navigations/homenavigator/Navigator.jsx';

function App () {
  return (
    <SafeAreaView style={[AppStyles.background]}>
      <ScrollView
        contentContainerStyle={AppStyles.container}
        >
          <View style={{left:-20,top:0}}>
              <EllipseIcon width={165} height={165} />
          </View>
          <View style={{position:'absolute',top:-20,left:0}}>
              <TopEllipseIcon width={165} height={165} />
          </View>

          <NavigationContainer>
            <HomeNavigator />
          </NavigationContainer>
      </ScrollView>
    </SafeAreaView>
  );
}

export default App;

HomeNavigator 
import * as React from 'react';
import { createDrawerNavigator } from '@react-navigation/drawer';
import HomeScreen from '../../screens/home/HomeScreen.jsx';
import SettingsScreen from '../../screens/settings/SettingsScreen.jsx' ;
import Login from '../../screens/login/Login.jsx';
const Drawer = createDrawerNavigator();
export default function HomeNavigator() {
  return (
        <Drawer.Navigator>
            
            <Drawer.Screen 
                name="Logout" 
                component={Login} 
            />
        </Drawer.Navigator>
  );
}
0

There are 0 answers