application-amicale/navigation/AppNavigator.js

50 lines
2.3 KiB
JavaScript
Raw Normal View History

// @flow
2019-06-27 10:17:51 +02:00
import {createAppContainer, createStackNavigator} from 'react-navigation';
import {createMaterialBottomTabNavigatorWithInitialRoute} from './MainTabNavigator';
import SettingsScreen from '../screens/SettingsScreen';
import AboutScreen from '../screens/About/AboutScreen';
2019-06-27 10:17:51 +02:00
import ProximoListScreen from '../screens/Proximo/ProximoListScreen';
2019-06-27 11:08:56 +02:00
import AboutDependenciesScreen from '../screens/About/AboutDependenciesScreen';
2019-09-28 12:01:19 +02:00
import ProxiwashAboutScreen from '../screens/Proxiwash/ProxiwashAboutScreen';
import ProximoAboutScreen from '../screens/Proximo/ProximoAboutScreen';
import SelfMenuScreen from '../screens/SelfMenuScreen';
import TutorInsaScreen from "../screens/TutorInsaScreen";
import AmicaleScreen from "../screens/AmicaleScreen";
import WiketudScreen from "../screens/WiketudScreen";
import AvailableRoomScreen from "../screens/AvailableRoomScreen";
import DebugScreen from '../screens/DebugScreen';
import {fromRight} from "react-navigation-transitions";
2019-06-25 22:20:24 +02:00
2019-06-29 15:43:57 +02:00
/**
* Create a stack navigator using the drawer to handle navigation between screens
*/
function createAppContainerWithInitialRoute(initialRoute: string) {
return createAppContainer(
createStackNavigator({
Main: createMaterialBottomTabNavigatorWithInitialRoute(initialRoute),
// Drawer: MainDrawerNavigator,
ProximoListScreen: {screen: ProximoListScreen},
SettingsScreen: {screen: SettingsScreen},
AboutScreen: {screen: AboutScreen},
AboutDependenciesScreen: {screen: AboutDependenciesScreen},
SelfMenuScreen: {screen: SelfMenuScreen},
TutorInsaScreen: {screen: TutorInsaScreen},
AmicaleScreen: {screen: AmicaleScreen},
WiketudScreen: {screen: WiketudScreen},
AvailableRoomScreen: {screen: AvailableRoomScreen},
ProxiwashAboutScreen: {screen: ProxiwashAboutScreen},
ProximoAboutScreen: {screen: ProximoAboutScreen},
DebugScreen: {screen: DebugScreen},
},
{
initialRouteName: "Main",
mode: 'card',
headerMode: "none",
transitionConfig: () => fromRight(),
})
);
}
export {createAppContainerWithInitialRoute};