Skip to content

Instantly share code, notes, and snippets.

@anhtuank7c
Created December 27, 2016 07:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anhtuank7c/bab38a2ed52d82ef99513df104c0428d to your computer and use it in GitHub Desktop.
Save anhtuank7c/bab38a2ed52d82ef99513df104c0428d to your computer and use it in GitHub Desktop.
<Router createReducer={reducerCreate}>
<Scene key="auth">
<Scene
key="sign_in"
component={SignIn}
app={app}
initial={needSignIn}
title="Sign in"
type="reset"
/>
<Scene
key="sign_up"
component={SignUp}
app={app}
title="Sign up"
type="replace"
leftTitle="Back"
onLeft={() => Actions.sign_in()}
/>
</Scene>
<Scene
key="drawer"
component={NavigationDrawer}
initial={!needSignIn}
hideNavBar
>
<Scene
key="main"
tabs
tabBarStyle={styles.tabBarStyle}
tabBarSelectedItemStyle={styles.tabBarSelectedItemStyle}
>
<Scene
key="news_list"
component={NewsList}
title="News"
app={app}
sceneStyle={{ marginTop: 65 }}
icon={TabIcon}
iconName="wifi-tethering"
iconSize={24}
/>
<Scene
key="lucky_number"
component={NewsList}
title="Random"
app={app}
navigationBarStyle={{ backgroundColor: 'green' }}
sceneStyle={{ marginTop: 65 }}
icon={TabIcon}
iconName="location-searching"
iconSize={24}
/>
<Scene
key="prize"
component={NewsList}
title="Prize"
app={app}
navigationBarStyle={{ backgroundColor: 'yellow' }}
sceneStyle={{ marginTop: 65 }}
icon={TabIcon}
iconName="trending-up"
iconSize={24}
/>
<Scene
key="history"
component={NewsList}
title="History"
app={app}
navigationBarStyle={{ backgroundColor: 'yellow' }}
sceneStyle={{ marginTop: 65 }}
icon={TabIcon}
iconName="history"
iconSize={24}
/>
<Scene key="profile" component={Profile} title="Profile" />
</Scene>
</Scene>
</Router>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment