-
Notifications
You must be signed in to change notification settings - Fork 0
/
App.tsx
53 lines (49 loc) · 1.89 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
import React from 'react';
import { View, Keyboard } from 'react-native';
import { NavigationContainer } from '@react-navigation/native';
import { createNativeStackNavigator } from '@react-navigation/native-stack';
import { Provider } from 'react-redux';
import setupStore from './app/redux/store';
import Menu from './app/screens/Menu';
import Home from './app/screens/Home';
import AddEditEntry from './app/screens/AddEditEntry';
import AddEditStatType from './app/screens/AddEditStatType';
import ImportExport from './app/screens/ImportExport';
import About from './app/screens/About';
const Stack = createNativeStackNavigator();
// Setup the store
const store = setupStore();
const App = () => {
return (
<Provider store={store}>
<View style={{ flex: 1 }} onStartShouldSetResponder={(): any => Keyboard.dismiss()}>
<NavigationContainer>
{/* screenOptions is the same as options on the Stack.Screen components, except they are global */}
<Stack.Navigator
initialRouteName="Menu"
screenOptions={{
headerStyle: {
backgroundColor: 'red',
},
headerTintColor: 'white',
headerTitleStyle: {
color: 'white',
fontWeight: 'bold',
fontSize: 24,
},
headerTitleAlign: 'center',
}}
>
<Stack.Screen name="Menu" component={Menu} />
<Stack.Screen name="Home" component={Home} />
<Stack.Screen name="AddEditEntry" component={AddEditEntry} />
<Stack.Screen name="AddEditStatType" component={AddEditStatType} />
<Stack.Screen name="Import/Export" component={ImportExport} />
<Stack.Screen name="About" component={About} />
</Stack.Navigator>
</NavigationContainer>
</View>
</Provider>
);
};
export default App;