-
Notifications
You must be signed in to change notification settings - Fork 0
/
App.js
executable file
·53 lines (44 loc) · 1.2 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
// install react-navigation
//TODO: import four screens
import HomeScreen from "./screens/HomeScreen";
import AddNewContact from "./screens/AddNewContact";
import ViewContact from "./screens/ViewContact";
import EditContact from "./screens/EditContact";
//TODO: import firebase
import * as firebase from "firebase";
// set up react navigation
import { createStackNavigator, createAppContainer } from "react-navigation";
const MainNavigator = createStackNavigator(
{
Home: { screen: HomeScreen },
Add: { screen: AddNewContact },
View: { screen: ViewContact },
Edit: { screen: EditContact }
},
{
defaultNavigationOptions: {
headerTintColor: "#fff",
headerStyle: {
backgroundColor: "#B83227"
},
headerTitleStyle: {
color: "#fff"
}
}
}
);
const App = createAppContainer(MainNavigator);
//TODO: Initialize Firebase
import { firebaseConfig } from "./firebaseConfig";
// Initialize Firebase
firebase.initializeApp(firebaseConfig);
//FirebaseTODO create firebase real-time database with rules
// {
// "rules": {
// ".read": true,
// ".write": true
// }
// }
export default App;
//rule changes in firebase storage
//allow read,write;