-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.js
108 lines (87 loc) · 2.6 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
import React from 'react';
import { NavigationContainer } from '@react-navigation/native';
import { createStackNavigator } from '@react-navigation/stack';
// ************************* Screens **************************
// import PlaceholderScreen from './Screens/PlaceholderScreen';
import MainScreen from "./Screens/MainScreen";
import AddEntry from "./Screens/AddEntry";
import Settings from './Screens/Settings'
import WelcomeScreen from './Screens/WelcomeScreen'
import SignUp from "./Screens/SignUp";
import LoadingScreen from "./Screens/LoadingScreen";
import SignIn from "./Screens/SignIn";
import { LogBox } from 'react-native';
import AppLoading from 'expo-app-loading';
import { useFonts } from 'expo-font';
// Firebase
import firebase from 'firebase';
import "firebase/firestore";
import firebaseConfig from './firebase'
if (!firebase.apps.length) {
console.log('Connected with Firebase')
firebase.initializeApp(firebaseConfig);
}
const Stack = createStackNavigator();
export default function App() {
LogBox.ignoreLogs(['Setting a timer']);
let [fontsLoaded] = useFonts({
'Roboto': require('native-base/Fonts/Roboto.ttf'),
'Roboto_medium': require('native-base/Fonts/Roboto_medium.ttf'),
'OpenSans_semiBold': require('./assets/fonts/OpenSans-SemiBold.ttf'),
});
if (!fontsLoaded) return <AppLoading />
else
return (
<NavigationContainer>
<Stack.Navigator>
<Stack.Screen
name={'Loading'}
component={LoadingScreen}
options={{ headerShown: false }}
/>
<Stack.Screen
name='Home'
component={WelcomeScreen}
options={{ headerShown: false }}
/>
<Stack.Screen
name='Sign Up'
component={SignUp}
options={{ headerShown: false }}
/>
<Stack.Screen
name='Sign In'
component={SignIn}
options={{ headerShown: false }}
/>
<Stack.Screen
name="MainScreen"
component={MainScreen}
options={{
title: '',
headerLeft: null,
headerShown: false,
}}
/>
<Stack.Screen
name="Settings"
component={Settings}
options={{
title: '',
headerLeft: null,
headerShown: false,
}}
/>
<Stack.Screen
name="Add"
component={AddEntry}
options={{
title: '',
headerLeft: null,
headerShown: false,
}}
/>
</Stack.Navigator>
</NavigationContainer>
);
}