Advertisement
Sweetening

Untitled

Dec 4th, 2023
40
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.24 KB | None | 0 0
  1. import React from 'react';
  2. import { NavigationContainer } from '@react-navigation/native';
  3. import { createBottomTabNavigator } from '@react-navigation/bottom-tabs';
  4. import { createDrawerNavigator } from '@react-navigation/drawer';
  5. import { createStackNavigator } from '@react-navigation/stack';
  6.  
  7. import Homescreen from './Screens/Homescreen';
  8. import Loginscreen from './Screens/Login';
  9. import MyAcc from './Screens/MyAcc';
  10. import CourseLoad from './Screens/CourseLoad';
  11. import ContractSheet from './Screens/ContractSheet';
  12. import CourseOffering from './Screens/CourseOffering';
  13. import Payment from './Screens/Payment';
  14. import Settings from './Screens/Settings';
  15. import FeedBack from './Screens/FeedBack';
  16. import Logout from './Screens/Logout';
  17.  
  18. const Tab = createBottomTabNavigator();
  19. const Drawer = createDrawerNavigator();
  20. const Stack = createStackNavigator();
  21.  
  22. function MyDrawer() {
  23. try {
  24. return (
  25. <Drawer.Navigator useLegacyImplementation>
  26. <Drawer.Screen name="Login" component={Loginscreen} />
  27. <Drawer.Screen name="HomeScreen" component={Homescreen} />
  28. <Drawer.Screen name="CourseLoad" component={CourseLoad} />
  29. <Drawer.Screen name="ContractSheet" component={ContractSheet} />
  30. <Drawer.Screen name="CourseOffering" component={CourseOffering} />
  31. <Drawer.Screen name="Payment" component={Payment} />
  32.  
  33. <Drawer.Screen name="Settings" component={Settings} />
  34.  
  35. <Drawer.Screen name="FeedBack" component={FeedBack} />
  36.  
  37. <Drawer.Screen name="Logout" component={Logout} />
  38. </Drawer.Navigator>
  39. );
  40. } catch (error) {
  41. console.error(error);
  42. return <Text>Error: {error.message}</Text>;
  43. }
  44. }
  45.  
  46. // Bottom Tab Navigator
  47. const App = () => {
  48. try {
  49. return (
  50. <NavigationContainer>
  51. <Tab.Navigator>
  52. <Tab.Screen name="Homescreen" component={MyDrawer} />
  53. <Tab.Screen name="Courses" component={MyDrawer} />
  54. <Tab.Screen name="Events" component={MyDrawer} />
  55. <Tab.Screen name="Profile" component={MyDrawer} />
  56. </Tab.Navigator>
  57. </NavigationContainer>
  58. );
  59. } catch (error) {
  60. console.error(error);
  61. return <Text>Error: {error.message}</Text>;
  62. }
  63. };
  64.  
  65. export default App;
  66.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement