-
Notifications
You must be signed in to change notification settings - Fork 0
/
App.tsx
47 lines (42 loc) · 1.3 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 Header from './components/Header';
import { LaunchData } from './types/launch.type';
import LaunchDetails from './screens/LaunchDetails';
import LaunchList from './screens/LaunchList';
import { NavigationContainer } from '@react-navigation/native';
import React from 'react';
import { createNativeStackNavigator } from '@react-navigation/native-stack';
export type RootStackParamList = {
'launch-list': undefined,
'launch-details': {
launch: LaunchData
}
}
const Stack = createNativeStackNavigator<RootStackParamList>();
const App: React.FC = () => {
return (
<NavigationContainer>
<Stack.Navigator>
<Stack.Screen
name="launch-list"
component={LaunchList}
options={{
title: 'A.S.T.R.A.L',
headerStyle: { backgroundColor: 'black' },
headerTintColor: 'white',
headerTitleAlign: 'center',
headerTitleStyle: { fontSize: 25 },
statusBarStyle: 'inverted'
}}></Stack.Screen>
<Stack.Screen
name="launch-details"
component={LaunchDetails}
options={{
title: 'Détails du lancement',
statusBarStyle: 'dark'
}}
></Stack.Screen>
</Stack.Navigator>
</NavigationContainer>
);
}
export default App;