aboutsummaryrefslogtreecommitdiff
path: root/mobile
diff options
context:
space:
mode:
authorKumar Damani <kumar.damani@mail.utoronto.ca>2019-03-15 21:42:06 +0000
committerKumar Damani <kumar.damani@mail.utoronto.ca>2019-03-15 21:42:06 +0000
commitec3018e222a25c53857b48140954688829ac1d27 (patch)
treedb509aaeeda28f435ec7797b72ae7a5718e92427 /mobile
parentc1c607231c344185061d0b042374728cfb89b8a4 (diff)
added back the back button
Diffstat (limited to 'mobile')
-rw-r--r--mobile/screens/Form1.js14
1 files changed, 11 insertions, 3 deletions
diff --git a/mobile/screens/Form1.js b/mobile/screens/Form1.js
index 3be77f8..a14d647 100644
--- a/mobile/screens/Form1.js
+++ b/mobile/screens/Form1.js
@@ -1,5 +1,5 @@
import React, { Component } from 'react';
-import { StyleSheet, Button, KeyboardAvoidingView } from 'react-native';
+import { StyleSheet, Button, View, KeyboardAvoidingView } from 'react-native';
import { Constants } from 'expo';
import t from 'tcomb-form-native';
@@ -107,7 +107,8 @@ export default class Form1 extends Component {
//// TODO: handle the response from the serve and decide what to display
//// based on that
//// for now just to back to the home page
- //this.props.navigation.navigate('GreetingPage');
+ alert("Thank you for your contribution.");
+ this.props.navigation.navigate('GreetingPage');
}
handleSubmit() {
@@ -139,7 +140,14 @@ export default class Form1 extends Component {
value={this.state.value}
onChange={this.onChange.bind(this)}
/>
- <Button title="Submit" onPress={() => this.handleSubmit()} />
+ <View style={{flexDirection: 'row'}}>
+ <View style={{flex:1 , marginRight:10}} >
+ <Button title="Back" onPress={() => this.props.navigation.navigate('GreetingPage')} />
+ </View>
+ <View style={{flex:1}} >
+ <Button title="Submit" color="#841584" onPress={() => this.handleSubmit()} />
+ </View>
+ </View>
</KeyboardAvoidingView>
);
}