forked from cdOut/pokedex
-
Notifications
You must be signed in to change notification settings - Fork 0
/
App.tsx
47 lines (43 loc) · 1.41 KB
/
App.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
import React from 'react';
import ListScreen from './components/screens/ListScreen';
import SelectScreen from './components/screens/SelectScreen';
import MapScreen from './components/screens/MapScreen';
import {NavigationContainer} from '@react-navigation/native';
import {createBottomTabNavigator} from '@react-navigation/bottom-tabs';
import {createNativeStackNavigator} from '@react-navigation/native-stack';
const RootStack = createBottomTabNavigator();
const NativeStack = createNativeStackNavigator();
const App = () => {
const ListStack = () => {
return (
<NativeStack.Navigator initialRouteName="List">
<NativeStack.Screen
options={{headerShown: false}}
name="Pokedex"
component={ListScreen}
/>
<NativeStack.Screen
options={{title: 'Pokemon'}}
name="Select"
component={SelectScreen}
/>
</NativeStack.Navigator>
);
};
return (
<NavigationContainer>
<RootStack.Navigator
screenOptions={{headerShown: false}}
initialRouteName="ListStack">
<RootStack.Screen name="Favorite" component={SelectScreen} />
<RootStack.Screen
options={{title: 'Pokedex'}}
name="ListStack"
component={ListStack}
/>
<RootStack.Screen name="Map" component={MapScreen} />
</RootStack.Navigator>
</NavigationContainer>
);
};
export default App;