-
Notifications
You must be signed in to change notification settings - Fork 0
/
App.tsx
62 lines (55 loc) · 1.68 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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
import * as React from 'react';
import {NavigationContainer, DefaultTheme} from '@react-navigation/native';
import {
createNativeStackNavigator,
NativeStackScreenProps,
} from '@react-navigation/native-stack';
import HomeScreen from './pages/Home';
import {NativeBaseProvider, StatusBar} from 'native-base';
import {theme} from './src/theme';
import CameraScreen from './pages/Camera';
import MedocScreen from './pages/Medoc';
import {LogBox} from 'react-native';
LogBox.ignoreAllLogs();
const NavigationTheme = {
dark: true,
colors: {
...DefaultTheme.colors,
card: theme.colors.background,
text: theme.colors.text,
background: theme.colors.background,
},
};
type RootStackParamList = {
Médoc: undefined;
'Recherche par code-barre': undefined;
Médicament: undefined;
};
export type HomeProps = NativeStackScreenProps<RootStackParamList, 'Médoc'>;
export type ItemProps = NativeStackScreenProps<
RootStackParamList,
'Médicament'
>;
export type CameraProps = NativeStackScreenProps<
RootStackParamList,
'Recherche par code-barre'
>;
const Stack = createNativeStackNavigator<RootStackParamList>();
function App() {
return (
<NativeBaseProvider>
<StatusBar animated={true} backgroundColor={theme.colors.background} />
<NavigationContainer theme={NavigationTheme}>
<Stack.Navigator>
<Stack.Screen name="Médoc" component={HomeScreen} />
<Stack.Screen
name="Recherche par code-barre"
component={CameraScreen}
/>
<Stack.Screen name="Médicament" component={MedocScreen} />
</Stack.Navigator>
</NavigationContainer>
</NativeBaseProvider>
);
}
export default App;