diff options
| author | Andrew <andrew.mihai@mail.utoronto.ca> | 2019-03-05 21:15:37 +0000 |
|---|---|---|
| committer | Andrew <andrew.mihai@mail.utoronto.ca> | 2019-03-05 21:15:37 +0000 |
| commit | f0b0f909dfb7658312c5df0a18591a203077282f (patch) | |
| tree | 30aa224d297704cb55c6c361ccaab289b8ec0437 /mobile/screens | |
| parent | 4793f7fd526aa1e53ca5f157622417b79c1b0c27 (diff) | |
Added A "Go Back" button to the form page. Fixed bug that would cause
app to produce an error if location services are turned off.
Please enter the commit message for your changes. Lines starting
Diffstat (limited to 'mobile/screens')
| -rw-r--r-- | mobile/screens/Form1.js | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/mobile/screens/Form1.js b/mobile/screens/Form1.js index 92eec30..963bde2 100644 --- a/mobile/screens/Form1.js +++ b/mobile/screens/Form1.js @@ -3,10 +3,10 @@ import {Text, Alert, AppRegistry, Button, StyleSheet, View, TextInput } from 're export default class Form1 extends Component { _onPressButton1() { - //const {navigation} = this.props; - //const coordinates = navigation.getparam('coordinates'); - var coordinates = this.coordinates ? coordinates : []; - Alert.alert("Thank you for your response.") + const { navigation } = this.props; + const coordinates = navigation.getParam('coordinates'); + //var coordinates = this.coordinates ? coordinates : []; + Alert.alert("Thank you for your response."); fetch('https://helpthehome-qa.herokuapp.com/mobilerequest', { method: 'POST', headers: { @@ -69,6 +69,12 @@ export default class Form1 extends Component { title="Submit!" /> </View> + <View style={{padding: 40}}> + <Button + onPress={() => this.props.navigation.navigate('GreetingPage')} + title="Go Back" + /> + </View> </View> ); } |
