Browse Source

final changes made

Orlando04 2 years ago
parent
commit
dd697b7080

+ 2
- 2
MocionesIUPI/screens/HomeScreen.js View File

12
 
12
 
13
     return (
13
     return (
14
         <View style = {globalStyles.container}>
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
         </View>
17
         </View>
18
     )
18
     )
19
 }
19
 }

+ 25
- 8
MocionesIUPI/screens/MocionScreen.js View File

33
 
33
 
34
     //sending to the API
34
     //sending to the API
35
     const PIN = pin;
35
     const PIN = pin;
36
-    const message = 'abc123';
36
+    const message = 'buenos dias';
37
     const votos = value;
37
     const votos = value;
38
 
38
 
39
      // this is for encrypting the message
39
      // this is for encrypting the message
48
     //connecting to API
48
     //connecting to API
49
     fetch(url);
49
     fetch(url);
50
 
50
 
51
+    alert("Su voto ha sido procesado!!")
52
+
51
     navigation.navigate('Pinpage'); // redirects back to PinPage
53
     navigation.navigate('Pinpage'); // redirects back to PinPage
52
 
54
 
53
     console.log(response);
55
     console.log(response);
56
   // here we want to display each mocion in a flatlist 
58
   // here we want to display each mocion in a flatlist 
57
   // it's supposed to be like buttons. Once clicked it would let you vote inside
59
   // it's supposed to be like buttons. Once clicked it would let you vote inside
58
   return (
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
     </View>
84
     </View>
69
   );
85
   );
70
-};
86
+};
87
+

+ 11
- 9
MocionesIUPI/styles/global.js View File

7
   },
7
   },
8
 
8
 
9
   tittleText: {
9
   tittleText: {
10
-    fontSize: 18,
10
+    marginVertical: 20,
11
+    alignItems: 'center',
12
+    justifyContent: 'center',
13
+    fontSize: 34,
11
     color: '#333',
14
     color: '#333',
12
   },
15
   },
13
 
16
 
14
   paragraph: {
17
   paragraph: {
15
-    marginVertical: 8,
18
+    alignItems: 'center',
19
+    justifyContent: 'center',
20
+    fontSize: 18,
21
+    marginVertical: 20,
16
     lineHeight: 20,
22
     lineHeight: 20,
17
   },
23
   },
18
 
24
 
19
   button: {
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