11import React from 'react' ;
2- import { createDrawerNavigator } from '@react-navigation/drawer ' ;
2+ import { createBottomTabNavigator } from '@react-navigation/bottom-tabs ' ;
33import PropTypes from 'prop-types' ;
44
5+ import BottomTabBar from './BottomTabBar.js' ;
6+
7+
58import EditUserNavigation from './EditUserNavigation.js' ;
6- import FavoritesScreen from '../screens/FavoritesScreen .js' ;
9+ import NotifNavigator from './NotifNavigator .js' ;
710import CodeScreen from '../screens/CodeScreen.js' ;
8- import NotificationScreen from '../screens/NotificationScreen.js' ;
911import HelpScreen from '../screens/HelpScreen.js' ;
1012
11- const Drawer = createDrawerNavigator ( ) ;
13+ const Tab = createBottomTabNavigator ( ) ;
1214
1315export default class MainNavigator extends React . Component
1416{
@@ -18,33 +20,25 @@ export default class MainNavigator extends React.Component
1820
1921 render ( ) {
2022 return (
21- < Drawer . Navigator initialRouteName = "Notifications" drawerContentOptions = { {
22- activeTintColor :'#24FF1F' ,
23- inactiveTintColor :'#fff' ,
24- } } drawerStyle = { {
25- backgroundColor : '#222222' ,
26- } } >
27- < Drawer . Screen name = "Notifications" >
28- { props => < NotificationScreen { ...props } logout = { ( ) => this . props . logout ( ) }
29- token = { this . props . token } url = { this . props . url } /> }
30- </ Drawer . Screen >
31- < Drawer . Screen name = "Favorites" >
32- { props => < FavoritesScreen { ...props } logout = { ( ) => this . props . logout ( ) }
23+ < Tab . Navigator initialRouteName = "Notifications"
24+ tabBar = { ( props ) => < BottomTabBar { ...props } /> } >
25+ < Tab . Screen name = "Notifications" >
26+ { props => < NotifNavigator { ...props } logout = { ( ) => this . props . logout ( ) }
3327 token = { this . props . token } url = { this . props . url } /> }
34- </ Drawer . Screen >
35- < Drawer . Screen name = "Code" >
28+ </ Tab . Screen >
29+ < Tab . Screen name = "Code" >
3630 { props => < CodeScreen { ...props } logout = { ( ) => this . props . logout ( ) }
3731 token = { this . props . token } url = { this . props . url } /> }
38- </ Drawer . Screen >
39- < Drawer . Screen name = "Account" >
32+ </ Tab . Screen >
33+ < Tab . Screen name = "Account" >
4034 { props => < EditUserNavigation { ...props } logout = { ( ) => this . props . logout ( ) }
4135 token = { this . props . token } url = { this . props . url } /> }
42- </ Drawer . Screen >
43- < Drawer . Screen name = "Help" >
36+ </ Tab . Screen >
37+ < Tab . Screen name = "Help" >
4438 { props => < HelpScreen { ...props } logout = { ( ) => this . props . logout ( ) }
4539 token = { this . props . token } url = { this . props . url } /> }
46- </ Drawer . Screen >
47- </ Drawer . Navigator >
40+ </ Tab . Screen >
41+ </ Tab . Navigator >
4842 ) ;
4943 }
5044}
0 commit comments