-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.android.js
57 lines (52 loc) · 1.22 KB
/
index.android.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
import React, { Component } from 'react';
import {
AppRegistry,
View,
Image
} from 'react-native';
import * as firebase from 'firebase';
import AppContainer from './app/Components/AppContainer';
import firebaseConfig from './firebaseConfig';
export default class MightyLifter extends Component {
constructor(props) {
super(props);
const { apiKey, authDomain, databaseURL, storageBucket, messagingSenderId } = firebaseConfig;
global.firebase = firebase.initializeApp({
apiKey,
authDomain,
databaseURL,
storageBucket,
messagingSenderId,
});
this.state = {
initialLoad: true
};
}
componentDidMount() {
setTimeout(() => {
this.setState({
initialLoad: false
});
}, 1000);
}
render() {
if (this.state.initialLoad) {
return (
<View style={{ flex: 1, alignItems: 'center' }}>
<Image
style={
{
flex: 1,
resizeMode: 'cover'
}
}
source={require('./images/gifs/splash.gif')} />
</View>
);
}
return (
<AppContainer />
);
}
}
AppRegistry.registerComponent('MightyLifter', () => MightyLifter);