-
Notifications
You must be signed in to change notification settings - Fork 0
/
App.js
112 lines (99 loc) · 2.73 KB
/
App.js
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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
import React, {useEffect} from 'react';
import { NavigationContainer } from '@react-navigation/native';
import { createNativeStackNavigator } from '@react-navigation/native-stack';
import Home from './screens/Home';
import Individual from './screens/Individual';
import NewCow from './screens/NewCow';
import AddButton from './components/AddButton';
import Camera from './screens/Camera';
import EditProcedure from './screens/EditProcedure';
import Settings from './screens/Settings';
import List from './screens/List';
import SplashScreen from 'react-native-splash-screen'
import { LogBox } from 'react-native';
LogBox.ignoreAllLogs();
export default function App() {
const Stack = createNativeStackNavigator();
useEffect(() => {
SplashScreen.hide();
}, [])
return (
<NavigationContainer>
<Stack.Navigator initialRouteName='Home'
screenOptions={{
headerStyle: {
backgroundColor: '#22bc09'
},
headerTintColor: '#fff',
headerTitleStyle: {
fontWeight: 'bold',
fontFamily: 'sans-serif-light',
fontSize: 19
},
}}>
<Stack.Screen
name="Home"
component={Home}
options={{
title: "Home",
headerTitle: "VASIKAN NEUVOLAKORTTI",
headerRight: () => (
<AddButton />
),
}}
/>
<Stack.Screen
name="Settings"
component={Settings}
options={{
title: "Settings",
headerTitle: "TIETOKANTA-ASETUKSET"
}}
/>
<Stack.Screen
name="NewCow"
component={NewCow}
options={{
title: "New Cow",
headerTitle: "LISÄÄ UUSI VASIKKA"
}}
/>
<Stack.Screen
name="Individual"
component={Individual}
options={{
title: "Edit cow",
headerTitle: "MUOKKAA VASIKAN TIETOJA"
}}
/>
<Stack.Screen
name="Camera"
component={Camera}
options={{
title: "Camera",
headerTitle: "SKANNAA KORVANUMERO"
}}
/>
<Stack.Screen
name="List"
component={List}
options={{
title: "List",
headerTitle: "VASIKAT",
headerRight: () => (
<AddButton />
),
}}
/>
<Stack.Screen
name="EditProcedure"
component={EditProcedure}
options={{
title: "EditProcedure",
headerTitle: "MUOKKAA TOIMENPIDETTÄ"
}}
/>
</Stack.Navigator>
</NavigationContainer>
);
}