Main home screen and loading screen

Routing, basic pages done, asyncstorage started, geolocationing working with emulator, need to change to 2 spaces
This commit is contained in:
Arjun Patel
2018-04-19 03:54:35 -07:00
parent f4e767815e
commit 249185536a
9 changed files with 1287 additions and 371 deletions
+14 -41
View File
@@ -1,9 +1,6 @@
/**
* Sample React Native App
* https://github.com/facebook/react-native
* @flow
/*
* Main file that overlooks entire app routing
*/
import React, { Component } from 'react';
import {
Platform,
@@ -17,47 +14,23 @@ import {
Stack
} from 'react-native-router-flux';
const instructions = Platform.select({
ios: 'Press Cmd+R to reload,\n' +
'Cmd+D or shake for dev menu',
android: 'Double tap R on your keyboard to reload,\n' +
'Shake or press menu button for dev menu',
});
// Imported screens to route through
import Home from './screens/home.js';
import Loading from './screens/loading.js';
type Props = {};
export default class App extends Component<Props> {
render() {
return (
<View style={styles.container}>
<Text style={styles.welcome}>
Welcome to React !
</Text>
<Text style={styles.instructions}>
To get started, edit App.js
</Text>
<Text style={styles.instructions}>
{instructions}
</Text>
</View>
<Router>
<Stack key='root' style={{paddingTop: 54}}>
<Scene key='home' component={Home} title="Home" hideNavBar={true} />
<Scene key='loading' component={Loading} title='Loading' />
{/*
<Scene key='chat' component={Chat} title='Chat' hideNavBar={false} />
*/}
</Stack>
</Router>
);
}
}
const styles = StyleSheet.create({
container: {
flex: 1,
justifyContent: 'center',
alignItems: 'center',
backgroundColor: '#F5FCFF',
},
welcome: {
fontSize: 20,
textAlign: 'center',
margin: 10,
},
instructions: {
textAlign: 'center',
color: '#333333',
marginBottom: 5,
},
});