|
@@ -24,7 +24,9 @@ Notifications.setNotificationHandler({
|
24
|
24
|
});
|
25
|
25
|
|
26
|
26
|
|
27
|
|
-const double = [];
|
|
27
|
+let x = "x";
|
|
28
|
+console.log(x);
|
|
29
|
+
|
28
|
30
|
|
29
|
31
|
export function Home_page({navigation}) {
|
30
|
32
|
|
|
@@ -49,10 +51,8 @@ export function Home_page({navigation}) {
|
49
|
51
|
});
|
50
|
52
|
|
51
|
53
|
responseListener.current = Notifications.addNotificationResponseReceivedListener(response => {
|
52
|
|
- //console.log("response", response);
|
53
|
54
|
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);
|
|
55
|
+ console.log("response appointments ", appointments[0])
|
56
|
56
|
navigation.navigate('Confirm',{tag: appointments[0]})
|
57
|
57
|
}
|
58
|
58
|
});
|
|
@@ -272,7 +272,7 @@ export function Home_page({navigation}) {
|
272
|
272
|
renderItem = {({item}) => (
|
273
|
273
|
<TouchableOpacity
|
274
|
274
|
onPress={async () => {
|
275
|
|
- console.log("item._id, home, interpreter", item)
|
|
275
|
+ //console.log("item._id, home, interpreter", item)
|
276
|
276
|
navigation.navigate('Cita',{tag: item, Pin: item})
|
277
|
277
|
}}
|
278
|
278
|
>
|
|
@@ -328,8 +328,9 @@ export function Home_page({navigation}) {
|
328
|
328
|
onPress={ async () => {
|
329
|
329
|
await sendPushNotification(item.i_token);
|
330
|
330
|
citaId(item._id);
|
331
|
|
- //double = appointments.map((number) => number);
|
332
|
|
- //console.log("double", double);
|
|
331
|
+ x = item._id;
|
|
332
|
+ console.log(x);
|
|
333
|
+ console.log("en pedir cita, appointments", appointments[0])
|
333
|
334
|
}
|
334
|
335
|
}
|
335
|
336
|
/>
|
|
@@ -385,7 +386,7 @@ async function registerForPushNotificationsAsync() {
|
385
|
386
|
return;
|
386
|
387
|
}
|
387
|
388
|
token = (await Notifications.getExpoPushTokenAsync()).data;
|
388
|
|
- console.log('Token:', token)
|
|
389
|
+ //console.log('Token:', token)
|
389
|
390
|
} else {
|
390
|
391
|
alert('Must use physical device for Push Notifications');
|
391
|
392
|
}
|