Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import React from 'react';
- import { NavigationContainer } from '@react-navigation/native';
- import { createBottomTabNavigator } from '@react-navigation/bottom-tabs';
- import { createDrawerNavigator } from '@react-navigation/drawer';
- import { createStackNavigator } from '@react-navigation/stack';
- import Homescreen from './Screens/Homescreen';
- import Loginscreen from './Screens/Login';
- import MyAcc from './Screens/MyAcc';
- import CourseLoad from './Screens/CourseLoad';
- import ContractSheet from './Screens/ContractSheet';
- import CourseOffering from './Screens/CourseOffering';
- import Payment from './Screens/Payment';
- import Settings from './Screens/Settings';
- import FeedBack from './Screens/FeedBack';
- import Logout from './Screens/Logout';
- const Tab = createBottomTabNavigator();
- const Drawer = createDrawerNavigator();
- const Stack = createStackNavigator();
- function MyDrawer() {
- try {
- return (
- <Drawer.Navigator useLegacyImplementation>
- <Drawer.Screen name="Login" component={Loginscreen} />
- <Drawer.Screen name="HomeScreen" component={Homescreen} />
- <Drawer.Screen name="CourseLoad" component={CourseLoad} />
- <Drawer.Screen name="ContractSheet" component={ContractSheet} />
- <Drawer.Screen name="CourseOffering" component={CourseOffering} />
- <Drawer.Screen name="Payment" component={Payment} />
- <Drawer.Screen name="Settings" component={Settings} />
- <Drawer.Screen name="FeedBack" component={FeedBack} />
- <Drawer.Screen name="Logout" component={Logout} />
- </Drawer.Navigator>
- );
- } catch (error) {
- console.error(error);
- return <Text>Error: {error.message}</Text>;
- }
- }
- // Bottom Tab Navigator
- const App = () => {
- try {
- return (
- <NavigationContainer>
- <Tab.Navigator>
- <Tab.Screen name="Homescreen" component={MyDrawer} />
- <Tab.Screen name="Courses" component={MyDrawer} />
- <Tab.Screen name="Events" component={MyDrawer} />
- <Tab.Screen name="Profile" component={MyDrawer} />
- </Tab.Navigator>
- </NavigationContainer>
- );
- } catch (error) {
- console.error(error);
- return <Text>Error: {error.message}</Text>;
- }
- };
- export default App;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement