Przeglądaj źródła

final changes made

Orlando04 2 lat temu
rodzic
commit
dd697b7080

+ 2
- 2
MocionesIUPI/screens/HomeScreen.js Wyświetl plik

@@ -12,8 +12,8 @@ export default App = ({ navigation }) => {
12 12
 
13 13
     return (
14 14
         <View style = {globalStyles.container}>
15
-            <Text style = {globalStyles.tittleText}>Home Screen</Text>
16
-            <Button title="go to pin page" onPress={pressHandler}/>
15
+            <Text style = {globalStyles.tittleText}>Bienvenidos a MocinesIUPI</Text>
16
+            <Button title="go to pin page" color={'#e81b39'} onPress={pressHandler}/>
17 17
         </View>
18 18
     )
19 19
 }

+ 25
- 8
MocionesIUPI/screens/MocionScreen.js Wyświetl plik

@@ -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
+

+ 11
- 9
MocionesIUPI/styles/global.js Wyświetl plik

@@ -7,23 +7,25 @@ export const globalStyles = StyleSheet.create({
7 7
   },
8 8
 
9 9
   tittleText: {
10
-    fontSize: 18,
10
+    marginVertical: 20,
11
+    alignItems: 'center',
12
+    justifyContent: 'center',
13
+    fontSize: 34,
11 14
     color: '#333',
12 15
   },
13 16
 
14 17
   paragraph: {
15
-    marginVertical: 8,
18
+    alignItems: 'center',
19
+    justifyContent: 'center',
20
+    fontSize: 18,
21
+    marginVertical: 20,
16 22
     lineHeight: 20,
17 23
   },
18 24
 
19 25
   button: {
20
-    alignItems: 'center',
21
-    justifyContent: 'center',
22
-    paddingVertical: 12,
23
-    paddingHorizontal: 32,
24
-    borderRadius: 4,
25
-    elevation: 3,
26
-    backgroundColor: '#e81b39',
26
+    //alignItems: 'center',
27
+    //justifyContent: 'center',
28
+    marginVertical: 10,
27 29
   }
28 30
 });
29 31