-
Notifications
You must be signed in to change notification settings - Fork 1
/
App.js
142 lines (136 loc) · 3.42 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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
import React from "react";
import LatestSermonScreen from "./src/screens/sermons/LatestSermonScreen";
import SermonScreen from "./src/screens/sermons/SermonScreen";
import SermonSeriesList from "./src/screens/sermons/SeriesListScreen";
import SermonListenModal from "./src/screens/sermons/SermonListenModal";
import LordsDayScreen from "./src/screens/lordsDay/SundayScreen";
import CalendarScreen from "./src/screens/connect/CalendarScreen";
import PeopleScreen from "./src/screens/people/PeopleListScreen";
import MoreScreen from "./src/screens/more/MoreListScreen";
import { NavigationContainer } from "@react-navigation/native";
import { createStackNavigator } from "@react-navigation/stack";
import { createBottomTabNavigator } from "@react-navigation/bottom-tabs";
import { FontAwesome5, FontAwesome } from "@expo/vector-icons";
const Sermons = createStackNavigator();
const BottomNavigation = createBottomTabNavigator();
var createHomeStack = () => (
<Sermons.Navigator
mode="modal"
screenOptions={() => ({
gestureEnabled: true,
})}
>
<Sermons.Screen
name="Home"
component={LatestSermonScreen}
options={{ headerShown: false }}
/>
<Sermons.Screen
name="Sermon"
component={SermonScreen}
options={{
title: "",
headerStyle: {
backgroundColor: "white",
borderBottomWidth: 0,
},
headerTintColor: "#1A1B1D",
}}
/>
<Sermons.Screen name="SermonSeries" component={SermonSeriesList} />
<Sermons.Screen
name="SermonListen"
component={SermonListenModal}
options={{
animationEnabled: true,
title: "",
headerStyle: {
backgroundColor: "white",
borderBottomWidth: 0,
},
headerTintColor: "#1A1B1D",
}}
/>
</Sermons.Navigator>
);
export default function App() {
return (
<NavigationContainer>
<BottomNavigation.Navigator
tabBarOptions={{
activeTintColor: "#0C7B93",
inactiveTintColor: "rgba(26,27,29, .4)",
style: {
backgroundColor: "white",
borderTopWidth: 1,
borderTopColor: "#F0F0F0",
justifyContent: "center",
height: 85,
},
}}
screenOptions={({ route }) => ({
tabBarIcon: ({ color, size }) => {
if (route.name === "Sermons") {
return (
<FontAwesome
name="play-circle"
color={color}
size={size}
/>
);
} else if (route.name === "Lord's Day") {
return (
<FontAwesome5
name="calendar"
color={color}
size={size}
/>
);
} else if (route.name === "Connect") {
return (
<FontAwesome
name="comment"
color={color}
size={size}
/>
);
} else if (route.name === "People") {
return (
<FontAwesome5
name="user-alt"
color={color}
size={size}
/>
);
}
return (
<FontAwesome5
name="ellipsis-h"
color={color}
size={size}
/>
);
},
})}
>
<BottomNavigation.Screen
name="Sermons"
children={createHomeStack}
/>
<BottomNavigation.Screen
name="Lord's Day"
component={LordsDayScreen}
/>
<BottomNavigation.Screen
name="Connect"
component={CalendarScreen}
/>
<BottomNavigation.Screen
name="People"
component={PeopleScreen}
/>
<BottomNavigation.Screen name="More" component={MoreScreen} />
</BottomNavigation.Navigator>
</NavigationContainer>
);
}