-
Notifications
You must be signed in to change notification settings - Fork 0
/
App.tsx
35 lines (32 loc) · 1.26 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
import { NavigationContainer, StackActions } from '@react-navigation/native';
import { createNativeStackNavigator } from '@react-navigation/native-stack';
import { StatusBar } from 'expo-status-bar';
import { View } from 'react-native'
import { s } from 'react-native-wind'
import CityDetails from './Screens/CityDetails';
import CountryDetails from './Screens/CountryDetails';
import Home from './Screens/Home';
export type ScreenParamList = {
Home: undefined;
CountryDetails: { Country: string | null | undefined; };
CityDetails: { City: string | null | undefined; };
}
export default function App() {
const Stack = createNativeStackNavigator<ScreenParamList>()
return (
<NavigationContainer >
<View style={s`h-full`}>
<StatusBar style="auto" />
<Stack.Navigator initialRouteName='Home'>
<Stack.Screen name='Home' component={Home} options={{ title: "Home" }} />
{/*
//@ts-ignore*/}
<Stack.Screen name='CountryDetails' component={CountryDetails} options={{ title: "Country Details" }} />
{/*
//@ts-ignore*/}
<Stack.Screen name='CityDetails' component={CityDetails} options={{ title: "City Details" }} />
</Stack.Navigator>
</View>
</NavigationContainer>
);
}