|
@@ -33,7 +33,7 @@ export default App = ({ navigation }) => {
|
33
|
33
|
|
34
|
34
|
//sending to the API
|
35
|
35
|
const PIN = pin;
|
36
|
|
- const message = 'abc123';
|
|
36
|
+ const message = 'buenos dias';
|
37
|
37
|
const votos = value;
|
38
|
38
|
|
39
|
39
|
// this is for encrypting the message
|
|
@@ -48,6 +48,8 @@ export default App = ({ navigation }) => {
|
48
|
48
|
//connecting to API
|
49
|
49
|
fetch(url);
|
50
|
50
|
|
|
51
|
+ alert("Su voto ha sido procesado!!")
|
|
52
|
+
|
51
|
53
|
navigation.navigate('Pinpage'); // redirects back to PinPage
|
52
|
54
|
|
53
|
55
|
console.log(response);
|
|
@@ -56,15 +58,30 @@ export default App = ({ navigation }) => {
|
56
|
58
|
// here we want to display each mocion in a flatlist
|
57
|
59
|
// it's supposed to be like buttons. Once clicked it would let you vote inside
|
58
|
60
|
return (
|
59
|
|
- <View style={{ flex: 1, padding: 24 }}>
|
60
|
|
- <Text>{mocion}</Text>
|
61
|
|
- <Text>{description}</Text>
|
|
61
|
+ <View>
|
|
62
|
+
|
|
63
|
+ <View style={globalStyles.tittleText}>
|
|
64
|
+ <Text style={{fontSize: 24}}>{mocion}</Text>
|
|
65
|
+ </View>
|
62
|
66
|
|
63
|
|
- <Button title='A favor' onPress={() => sendVotes('A Favor')}/>
|
64
|
|
- <Button title='En Contra'onPress={() => sendVotes('En Contra')} />
|
65
|
|
- <Button title='Abstenido/a' onPress={() => sendVotes('Abstenido/a')} />
|
|
67
|
+ <View>
|
|
68
|
+ <Text style={globalStyles.paragraph}>{description}</Text>
|
|
69
|
+ </View>
|
|
70
|
+
|
|
71
|
+ {/* View container for the buttons style */}
|
|
72
|
+ <View style={globalStyles.button}>
|
|
73
|
+ <Button title='A favor' color={'#e81b39'} onPress={() => sendVotes('A Favor')}/>
|
|
74
|
+ </View>
|
66
|
75
|
|
|
76
|
+ <View style={globalStyles.button}>
|
|
77
|
+ <Button title='En Contra' color={'#e81b39'} onPress={() => sendVotes('En Contra')} />
|
|
78
|
+ </View>
|
67
|
79
|
|
|
80
|
+ <View style={globalStyles.button}>
|
|
81
|
+ <Button title='Abstenido/a' color={'#e81b39'} onPress={() => sendVotes('Abstenido/a')} />
|
|
82
|
+ </View>
|
|
83
|
+
|
68
|
84
|
</View>
|
69
|
85
|
);
|
70
|
|
-};
|
|
86
|
+};
|
|
87
|
+
|