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