Created
April 6, 2018 08:44
-
-
Save HishamMubarak/38556030b90a2f2018a3ad20b70993f9 to your computer and use it in GitHub Desktop.
Routes Page
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react' | |
import { TabNavigator, StackNavigator, TabBarBottom } from 'react-navigation'; | |
import Splash from '../screens/Splash' | |
import Login from '../screens/Login' | |
import Home from '../screens/Home' | |
import Weather from '../screens/Weather' | |
import Details from '../screens/Details' | |
import Average from '../screens/Average' | |
import AverageGraph from '../screens/AverageGraph' | |
import Savings from '../screens/Savings' | |
export const externalStack = StackNavigator( | |
{ | |
Splash: { screen: Splash }, | |
Login: { screen: Login }, | |
},{ | |
headerMode: 'none', | |
initialRouteName: 'Splash', | |
transitionConfig: () => ({ | |
transitionSpec: { | |
duration: 0 | |
}}) | |
}) | |
export const internalStack = StackNavigator( | |
{ | |
Home: { screen: Home }, | |
Weather: { screen: Weather }, | |
Details: { screen: Details }, | |
Average: { screen: Average }, | |
AverageGraph: { screen: AverageGraph }, | |
Savings: { screen: Savings } | |
},{ | |
initialRouteName: 'Home', | |
transitionConfig: () => ({ | |
transitionSpec: { | |
duration: 0 | |
}}) | |
}) | |
export const mainStack = StackNavigator( | |
{ | |
external: { screen: externalStack }, | |
internal: { screen: internalStack }, | |
},{ | |
headerMode: 'none', | |
initialRouteName: 'external', | |
transitionConfig: () => ({ | |
transitionSpec: { | |
duration: 0 | |
}}) | |
}) | |
export default mainStack |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment