chore: use lowercase route names

This commit is contained in:
satyajit.happy
2019-08-18 11:56:54 +05:30
parent 396bf3c081
commit 7f5f3ddb6e
2 changed files with 46 additions and 9 deletions

View File

@@ -27,23 +27,23 @@ import MaterialBottomTabs from './Screens/MaterialBottomTabs';
YellowBox.ignoreWarnings(['Require cycle:', 'Warning: Async Storage']);
type RootDrawerParamList = {
Root: undefined;
root: undefined;
};
type RootStackParamList = {
Home: undefined;
home: undefined;
} & {
[P in keyof typeof SCREENS]: undefined;
};
const SCREENS = {
SimpleStack: { title: 'Simple Stack', component: SimpleStackScreen },
BottomTabs: { title: 'Bottom Tabs', component: BottomTabsScreen },
MaterialTopTabs: {
'simple-stack': { title: 'Simple Stack', component: SimpleStackScreen },
'bottom-tabs': { title: 'Bottom Tabs', component: BottomTabsScreen },
'material-top-tabs': {
title: 'Material Top Tabs',
component: MaterialTopTabsScreen,
},
MaterialBottomTabs: {
'material-bottom-tabs': {
title: 'Material Bottom Tabs',
component: MaterialBottomTabs,
},
@@ -96,7 +96,7 @@ export default function App() {
}
>
<Drawer.Navigator>
<Drawer.Screen name="Root" options={{ title: 'Examples' }}>
<Drawer.Screen name="root" options={{ title: 'Examples' }}>
{({
navigation,
}: {
@@ -104,7 +104,7 @@ export default function App() {
}) => (
<Stack.Navigator>
<Stack.Screen
name="Home"
name="home"
options={{
title: 'Examples',
headerLeft: () => (