Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import {
- BottomRoutes,
- NavigationDefinitionMap,
- TNavigatorOptions
- } from '../../lib/navigation'
- import {
- createBottomTabNavigator
- } from 'react-navigation-tabs'
- import RequestListScreen, {
- requestListNavigatorOptions
- } from '@screens/service-request/RequestListScreen'
- import ProfileViewScreen, {
- profileViewScreenNavigationOptions
- } from '@screens/profile/ProfileViewScreen'
- import { createStackNavigator } from 'react-navigation-stack'
- import BottomTabBar from '@navigation/navigators/BottomTabBar'
- type BottomNavigationParams =
- Parameters<typeof createBottomTabNavigator>
- const bottomRouteMaps: NavigationDefinitionMap<
- BottomRoutes,
- BottomNavigationParams[0][string]
- > = {
- RequestList: {
- screen: createStackNavigator({
- Request: {
- screen: RequestListScreen,
- navigationOptions: requestListNavigatorOptions
- }
- })
- },
- ProfileView: {
- screen: createStackNavigator({
- Profile: {
- screen: ProfileViewScreen,
- navigationOptions: profileViewScreenNavigationOptions
- }
- })
- }
- }
- const configs: TNavigatorOptions<
- BottomRoutes,
- BottomNavigationParams[1]
- > = {
- initialRouteName: 'RequestList',
- tabBarComponent: BottomTabBar
- }
- export default createBottomTabNavigator(
- bottomRouteMaps,
- configs
- )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement