-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.js
69 lines (59 loc) · 2.39 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
/**
* @format
* @flow strict-local
*/
import 'react-native-gesture-handler';
import React from 'react';
import { View } from 'react-native';
import { NavigationContainer} from '@react-navigation/native';
import { createStackNavigator } from '@react-navigation/stack';
import { createBottomTabNavigator } from '@react-navigation/bottom-tabs';
import Icon from 'react-native-vector-icons/Feather';
import {ThemeProvider} from "react-native-elements"
// screens
import HomeScreen from './screens/HomeScreen';
import PendingScreen from './screens/PendingScreen';
import CharacterScreen from './screens/CharacterScreen';
import InventoryScreen from './screens/InventoryScreen';
import {PopupHandler} from "./components/PopupHandler"
import Locator from './components/location'
import {theme} from './theme';
import { DBLoader } from './components/chunkDB';
const Tab = createBottomTabNavigator();
export default function App() {
return (
<ThemeProvider theme={theme}>
<View style={{flex:1}}>
<DBLoader></DBLoader>
{/*navigation stuff*/}
<NavigationContainer>
<Tab.Navigator
tabBarOptions={{activeBackgroundColor:theme.colors.card,inactiveBackgroundColor:theme.colors.background2}}
screenOptions={({ route }) => ({
tabBarIcon: ({ focused, color, size }) => {
let iconName = "map";
if(route.name =="Home"){
iconName ="map";// newspaper navigate person
}else if(route.name =="Pending Actions"){
iconName ="edit";// newspaper navigate person
}if(route.name =="Character"){
iconName ="user";// newspaper navigate person
}if(route.name =="Inventory"){
iconName ="briefcase";// newspaper navigate person
}
// You can return any component that you like here!
return <Icon name={iconName} size={size} color={color} />
},
})}
>
<Tab.Screen name="Home" component={HomeScreen} />
<Tab.Screen name="Pending Actions" component={PendingScreen} />
<Tab.Screen name="Inventory" component={InventoryScreen}/>
<Tab.Screen name="Character" component={CharacterScreen} />
</Tab.Navigator>
</NavigationContainer>
<Locator></Locator>
<PopupHandler></PopupHandler>
</View>
</ThemeProvider>
);};