Browse Source

Edited and added more code related motions' votes

luislopez66 2 years ago
parent
commit
861ce2a1a6
1 changed files with 12 additions and 2 deletions
  1. 12
    2
      MocionesIUPI/screens/MocionScreen.js

+ 12
- 2
MocionesIUPI/screens/MocionScreen.js View File

@@ -28,8 +28,8 @@ export default App = () => {
28 28
     }
29 29
   }
30 30
 
31
-  function getVotoNums() {
32
-    const [countFavor, setcountFavor] = useState(0);
31
+  function getVotoFavorNums() {
32
+    const [countFavor, setCountFavor] = useState(0);
33 33
 
34 34
     return (
35 35
       <div>
@@ -38,7 +38,9 @@ export default App = () => {
38 38
         </button>
39 39
       </div>
40 40
     );
41
+  }
41 42
 
43
+  function getVotoContraNums() {
42 44
     const [countContra, setCountContra] = useState(0);
43 45
 
44 46
     return (
@@ -48,7 +50,9 @@ export default App = () => {
48 50
         </button>
49 51
       </div>
50 52
     );
53
+  }
51 54
 
55
+  function getVotoAbstenidNums() {
52 56
     const [countAbstenid, setCountAbstenid] = useState(0);
53 57
 
54 58
     return (
@@ -60,6 +64,12 @@ export default App = () => {
60 64
     );
61 65
   }
62 66
 
67
+  function getVotoNums() {
68
+    getVotoFavorNums();
69
+    getVotoContraNums();
70
+    getVotoAbstenidNums();
71
+  }
72
+
63 73
   const getVotos = async () => {
64 74
     try {
65 75
       const response = await fetch('http://10.190.1.140:5000/send?PIN=121071'); // connection to the website