-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.tsx
124 lines (115 loc) · 3.27 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
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
113
114
115
116
117
118
119
120
121
122
123
124
import * as React from 'react';
import { createDrawerNavigator } from '@react-navigation/drawer';
import { NavigationContainer } from '@react-navigation/native';
import { createBottomTabNavigator } from '@react-navigation/bottom-tabs';
import { FontAwesome5 } from '@expo/vector-icons';
import { StyleSheet, Text, View , Settings } from 'react-native';
// Redux related
import { Provider } from 'react-redux'
import { createStore } from 'redux';
import reducer from './reducers/settings.js'
//Applicatino screens and paages
import TaskListScreen from './components/tasks/TaskListScreen.jsx'
import ActivityListScreen from './components/activities/ActivityListScreen.jsx'
const Tab = createBottomTabNavigator();
const Drawer = createDrawerNavigator();
const intialState = {
baseUrl: "http://192.168.1.140:12345"
}
const store = createStore(reducer, intialState)
const style = StyleSheet.create({
bottomTabIcons: {
color: '#3ea784',
elevation: 8,
shadowColor: "#000",
shadowOffset: {
width: 0,
height: 4,
},
shadowOpacity: 0.25,
shadowRadius: 3.84,
fontSize: 24,
marginBottom: -10
}
})
export default function App() {
return (
<Provider store={store}>
<NavigationContainer>
<Tab.Navigator
tabBarOptions={{
activeTintColor: '#0d7754',
style: {
height: 70
},
labelStyle: {
fontWeight: "bold",
marginBottom: 10,
marginTop: 2,
},
}}
>
<Tab.Screen
name="Activities"
component={ActivityListScreen}
options={{
tabBarLabel: 'Activities',
tabBarIcon: () => (
<FontAwesome5
name="check-double"
style={style.bottomTabIcons}
/>
),
}}
/>
<Tab.Screen
name="Tasks"
component={TaskListScreen}
options={{
tabBarLabel: 'Tasks',
tabBarIcon: () => (
<FontAwesome5
name="bath"
style={style.bottomTabIcons}
/>
),
}}
/>
<Tab.Screen
name="Members"
component={TaskListScreen}
options={{
tabBarLabel: 'Members',
tabBarIcon: () => (
<FontAwesome5
name="users"
style={style.bottomTabIcons}
/>
),
}}
/>
<Tab.Screen
name="Account"
component={TaskListScreen}
options={{
tabBarLabel: 'Account',
tabBarIcon: ({ color, size }) => (
<FontAwesome5
name="cogs"
style={style.bottomTabIcons}
/>
),
}}
/>
</Tab.Navigator>
</NavigationContainer>
</Provider>
/*
<NavigationContainer>
<Drawer.Navigator initialRouteName="Task List">
<Drawer.Screen name="Home" component={HomeScreen} />
<Drawer.Screen name="Task List" component={TaskListScreen} />
</Drawer.Navigator>
</NavigationContainer> */
);
}