-
Notifications
You must be signed in to change notification settings - Fork 9
/
App.js
62 lines (55 loc) · 1.78 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
/**
* Sample React Native App with Firebase
* https://github.com/invertase/react-native-firebase
*
* @format
* @flow
*/
import React, { Component } from 'react';
import { Platform, StyleSheet, Text, View } from 'react-native';
import firebase from '@react-native-firebase/app';
import Router from './src/Router';
import {Provider} from 'react-redux';
import store from './src/redux/store';
// TODO(you): import any additional firebase services that you require for your app, e.g for auth:
// 1) install the npm package: `yarn add @react-native-firebase/auth@alpha` - you do not need to
// run linking commands - this happens automatically at build time now
// 2) rebuild your app via `yarn run run:android` or `yarn run run:ios`
// 3) import the package here in your JavaScript code: `import '@react-native-firebase/auth';`
// 4) The Firebase Auth service is now available to use here: `firebase.auth().currentUser`
const instructions = Platform.select({
ios: 'Press Cmd+R to reload,\nCmd+D or shake for dev menu',
android: 'Double tap R on your keyboard to reload,\nShake or press menu button for dev menu',
});
const firebaseCredentials = Platform.select({
ios: 'https://invertase.link/firebase-ios',
android: 'https://invertase.link/firebase-android',
});
export default class App extends Component {
render() {
return (
<Provider store={store}>
<Router />
</Provider>
);
}
}
const styles = StyleSheet.create({
container: {
flex: 1,
justifyContent: 'center',
alignItems: 'center',
backgroundColor: 'black',
},
welcome: {
fontSize: 20,
textAlign: 'center',
margin: 10,
},
instructions: {
fontFamily: 'RobotoMono-Regular',
textAlign: 'center',
color: 'rgb(0,205,0)',
marginBottom: 5,
},
});