Browse Source

changed styles of the buttons

Orlando04 2 years ago
parent
commit
997aec6aa9

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

9
     // this connects us to the API and fetches the json file with the mociones
9
     // this connects us to the API and fetches the json file with the mociones
10
     const getMociones = async () => {
10
     const getMociones = async () => {
11
        try {
11
        try {
12
-        const response = await fetch('http://10.0.0.66:5000/send?PIN=121071'); // connection to the website 
12
+        const response = await fetch('http://192.168.1.200:5000/send?PIN=121071'); // connection to the website 
13
         const json = await response.json();
13
         const json = await response.json();
14
   
14
   
15
         // setting the content of each category 
15
         // setting the content of each category 
23
     }
23
     }
24
 
24
 
25
     const pressHandler = () => {
25
     const pressHandler = () => {
26
-        navigation.navigate('Pinpage', {Pin:PIN},)
26
+        navigation.navigate('Pinpage', {Pin:PIN},) // with this we send parameters to other screens
27
     }
27
     }
28
     
28
     
29
     useEffect(() => {
29
     useEffect(() => {
33
     return (
33
     return (
34
         <View style = {globalStyles.container}>
34
         <View style = {globalStyles.container}>
35
             <Text style = {globalStyles.tittleText}>Home Screen</Text>
35
             <Text style = {globalStyles.tittleText}>Home Screen</Text>
36
-            <Button title='Ir a pagina de pin' onPress={pressHandler} />
36
+            <Button title='Ir a pagina de pin' color={'#e81b39'} onPress={pressHandler} />
37
         </View>
37
         </View>
38
 
38
 
39
         
39
         

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

1
 import React, { useEffect, useState } from 'react';
1
 import React, { useEffect, useState } from 'react';
2
-import { ActivityIndicator, FlatList, Text, TouchableOpacity, View } from 'react-native';
2
+import { ActivityIndicator, Button, FlatList, Text, TouchableOpacity, View } from 'react-native';
3
 import { globalStyles } from '../styles/global';
3
 import { globalStyles } from '../styles/global';
4
 import Card from '../shared/card';
4
 import Card from '../shared/card';
5
 
5
 
11
       // this connects us to the API and fetches the json file with the mociones
11
       // this connects us to the API and fetches the json file with the mociones
12
       const getMociones = async () => {
12
       const getMociones = async () => {
13
         try {
13
         try {
14
-         const response = await fetch('http://10.0.0.66:5000/send?PIN=121071'); // connection to the website 
14
+         const response = await fetch('http://192.168.1.200:5000/send?PIN=121071'); // connection to the website 
15
          const json = await response.json();
15
          const json = await response.json();
16
    
16
    
17
          // setting the content of each category 
17
          // setting the content of each category 
35
 
35
 
36
       <Text>{Mocion}</Text>
36
       <Text>{Mocion}</Text>
37
       <Text>{Description}</Text>
37
       <Text>{Description}</Text>
38
+      <Button title= 'A favor' color={'#e81b39'} />
38
     </View>
39
     </View>
39
   );
40
   );
40
 };
41
 };

+ 1
- 1
MocionesIUPI/screens/PincodeScreen.js View File

47
           </View>
47
           </View>
48
           
48
           
49
           <View style={globalStyles.container}>
49
           <View style={globalStyles.container}>
50
-            { pincode && <Button title='Ir a mocion' onPress={this.pressHandler} />}
50
+            { pincode && <Button title='Ir a mocion' color = {'#e81b39'} onPress={this.pressHandler} />}
51
           </View>
51
           </View>
52
 
52
 
53
         </View>
53
         </View>