-
Notifications
You must be signed in to change notification settings - Fork 0
/
App.js
76 lines (73 loc) · 2.27 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
import { createBottomTabNavigator } from "@react-navigation/bottom-tabs";
import { StatusBar } from "expo-status-bar";
import { NavigationContainer } from "@react-navigation/native";
import CameraScreen from "./screens/CameraScreen";
import WorkoutScreen from "./screens/WorkoutScreen";
import WorkoutContextProvider from "./contexts/workout-context";
import colors from "./util/colors";
import { Ionicons } from "@expo/vector-icons";
import { AlertNotificationRoot } from "react-native-alert-notification";
import HomeScreen from "./screens/HomeScreen";
import { LogBox } from "react-native";
const Tab = createBottomTabNavigator();
const defaultOptions = {
headerTitleStyle: {
fontWeight: "bold",
},
headerStyle: {
backgroundColor: colors.primary,
},
headerTintColor: "white",
tabBarActiveTintColor: colors.secondary,
tabBarStyle: {
borderTopColor: colors.primary,
borderTopWidth: 5,
backgroundColor: colors.primary,
},
contentStyle: {
backgroundColor: colors.primary,
},
};
export default function App() {
LogBox.ignoreAllLogs();
return (
<>
<AlertNotificationRoot>
<StatusBar style="light" />
<WorkoutContextProvider>
<NavigationContainer>
<Tab.Navigator screenOptions={defaultOptions}>
<Tab.Screen
name="Home"
component={HomeScreen}
options={{
tabBarIcon: ({ color }) => (
<Ionicons name="home" size={30} color={color} />
),
}}
/>
<Tab.Screen
name="Workout"
component={WorkoutScreen}
options={{
tabBarIcon: ({ color }) => (
<Ionicons name="barbell" size={30} color={color} />
),
}}
/>
<Tab.Screen
name="Camera"
component={CameraScreen}
options={{
tabBarIcon: ({ color }) => (
<Ionicons name="camera" size={30} color={color} />
),
}}
/>
</Tab.Navigator>
</NavigationContainer>
</WorkoutContextProvider>
</AlertNotificationRoot>
</>
);
}