Pārlūkot izejas kodu

A veces el transferir el appointment en la navegacion de home_page a confirm se rompe. No se la explicacion. Como esta ahora esta funcionando la mayoria de las veces.

ErnestoOrtiz2 3 gadus atpakaļ
vecāks
revīzija
a08ad74e9a
2 mainītis faili ar 8 papildinājumiem un 8 dzēšanām
  1. 1
    1
      screens/main/Confirm.js
  2. 7
    7
      screens/main/Home_page.js

+ 1
- 1
screens/main/Confirm.js Parādīt failu

@@ -62,7 +62,7 @@ export function Confirm({route, navigation}) {
62 62
         };
63 63
       });
64 64
       setAppointments(appointments);
65
-      console.log("appointment", appointments);
65
+      console.log("appointment query de confirm", appointments);
66 66
     });
67 67
       
68 68
     return () => {

+ 7
- 7
screens/main/Home_page.js Parādīt failu

@@ -51,8 +51,8 @@ export function Home_page({navigation}) {
51 51
     responseListener.current = Notifications.addNotificationResponseReceivedListener(response => {
52 52
       //console.log("response", response);
53 53
       if (response.notification.request.content.body == 'Le solicitan una cita'){
54
-        //console.log("en pedir response", {appointments});
55
-        //console.log("el id", appointments[0]._id);
54
+        console.log("en pedir response", {appointments});
55
+        console.log("el id", appointments[0]._id);
56 56
         navigation.navigate('Confirm',{tag: appointments[0]})
57 57
       } 
58 58
     });
@@ -115,7 +115,7 @@ export function Home_page({navigation}) {
115 115
         };
116 116
       });
117 117
       setAppointments(appointments);
118
-      console.log("appointment", appointments);
118
+      //console.log("appointment", appointments);
119 119
     });
120 120
 
121 121
       
@@ -169,7 +169,7 @@ export function Home_page({navigation}) {
169 169
   
170 170
 
171 171
   check_user_type_INT();
172
-  console.log("interpreter", interpreter);
172
+  //console.log("interpreter", interpreter);
173 173
 
174 174
   
175 175
   if(interpreter == false){
@@ -186,7 +186,7 @@ export function Home_page({navigation}) {
186 186
         renderItem = {({item}) => (
187 187
         <TouchableOpacity
188 188
         onPress={async () => {
189
-          console.log("item._id, home, client", item.Pin)
189
+          //console.log("item._id, home, client", item.Pin)
190 190
           navigation.navigate('Cita',{tag: item, Pin: item})
191 191
         }}
192 192
         >
@@ -328,8 +328,8 @@ export function Home_page({navigation}) {
328 328
               onPress={ async () => {
329 329
                 await sendPushNotification(item.i_token);
330 330
                 citaId(item._id);
331
-                console.log("appointment", appointments);
332
-                double = appointments.map((number) => number);
331
+                //double = appointments.map((number) => number);
332
+                //console.log("double", double);
333 333
                 }
334 334
               }
335 335
             />