From 9438381045c142d38bd1aa28c307723fdb016e4a Mon Sep 17 00:00:00 2001 From: Andrew Date: Sun, 24 Feb 2019 10:24:43 -0500 Subject: Created the greeting page of application. Page contains button to fetch location, and button to drop pin. Both buttons lead to blank pages. This is an initial prototype. --- mobile/App.js | 29 +++++----- mobile/components/FormPage.js | 20 +++++++ mobile/components/GreetingPage.js | 112 ++++++++++++++++++++++++++++++++++++++ 3 files changed, 146 insertions(+), 15 deletions(-) create mode 100644 mobile/components/FormPage.js create mode 100644 mobile/components/GreetingPage.js diff --git a/mobile/App.js b/mobile/App.js index 7271bc2..4348381 100644 --- a/mobile/App.js +++ b/mobile/App.js @@ -1,17 +1,16 @@ import React, { Component } from 'react'; -import { Text, View } from 'react-native'; +import { Text, View, Alert, StyleSheet, Button, AppRegistry, Navigator, TouchableHighlight} from 'react-native'; +import { Ionicons } from '@expo/vector-icons'; +import { createStackNavigator, createAppContainer } from 'react-navigation'; -export default class HelloWorldApp extends Component { - //Every component needs a render() function - render() { - return ( - // acts like the way
does in JavaScript - //style={...} stores properties about where you want the component to be placed - //and how you want it to look. It's similar to adding CSS styles to HTML elements - //when creating web pages - - Hello world! - - ); - } -} +import GreetingPage from './components/GreetingPage'; +import FormPage from './components/FormPage'; + + +const RootStack = createStackNavigator( {GreetingPage: GreetingPage, FormPage: FormPage,}, + {headerMode: 'none'}) + +const App = createAppContainer(RootStack) + +export default App; + diff --git a/mobile/components/FormPage.js b/mobile/components/FormPage.js new file mode 100644 index 0000000..9ea3dce --- /dev/null +++ b/mobile/components/FormPage.js @@ -0,0 +1,20 @@ +import React, { Component } from 'react'; +import { Text, View, Alert, StyleSheet, Button, AppRegistry, Navigator, TouchableHighlight} from 'react-native'; +import { Ionicons } from '@expo/vector-icons'; +import { createStackNavigator, createAppContainer } from 'react-navigation'; + +export default class FormPage extends Component { + render() { + return ( + + + Put the form stuff here + +