|
@@ -45,26 +45,6 @@ export function Confirm({navigation}) {
|
45
|
45
|
navigation.navigate('Search');
|
46
|
46
|
});
|
47
|
47
|
|
48
|
|
- const fire = firebase.firestore()
|
49
|
|
- .collection('THREADS')
|
50
|
|
- .where("members", "array-contains", firebase.auth().currentUser.uid)
|
51
|
|
- .onSnapshot(querySnapshot => {
|
52
|
|
- const threads = querySnapshot.docs.map(documentSnapshot => {
|
53
|
|
- return{
|
54
|
|
- _id:documentSnapshot.id,
|
55
|
|
- name:'',
|
56
|
|
- ...documentSnapshot.data()
|
57
|
|
- };
|
58
|
|
- });
|
59
|
|
-
|
60
|
|
- setThreads(threads);
|
61
|
|
- console.log(threads);
|
62
|
|
-
|
63
|
|
- if(loading){
|
64
|
|
- setLoading(false);
|
65
|
|
- }
|
66
|
|
- });
|
67
|
|
-
|
68
|
48
|
const cita = firebase.firestore().collection('APPOINTMENTS').where("new", "==", 'true').onSnapshot(snapShot => {
|
69
|
49
|
const appointments = snapShot.docs.map(docSnap => {
|
70
|
50
|
return{
|
|
@@ -81,20 +61,19 @@ export function Confirm({navigation}) {
|
81
|
61
|
});
|
82
|
62
|
setAppointments(appointments);
|
83
|
63
|
console.log("appointment", appointments);
|
84
|
|
- //console.log(appointments.Day);
|
85
|
64
|
});
|
86
|
65
|
|
87
|
66
|
return () => {
|
88
|
67
|
Notifications.removeNotificationSubscription(notificationListener.current);
|
89
|
68
|
Notifications.removeNotificationSubscription(responseListener.current);
|
90
|
|
- fire();
|
|
69
|
+ //fire();
|
91
|
70
|
cita();
|
92
|
71
|
}
|
93
|
72
|
}, []);
|
94
|
73
|
|
95
|
|
- if (loading) {
|
|
74
|
+ /* if (loading) {
|
96
|
75
|
return <Loading />;
|
97
|
|
- }
|
|
76
|
+ }*/
|
98
|
77
|
|
99
|
78
|
|
100
|
79
|
function crearChat(cliente, citaID) {
|
|
@@ -142,8 +121,8 @@ export function Confirm({navigation}) {
|
142
|
121
|
ItemSeparatorComponent={() => <Divider />}
|
143
|
122
|
renderItem = {({item}) => (
|
144
|
123
|
<TouchableOpacity
|
145
|
|
- onPress={async () => {
|
146
|
|
- await sendPushNotification(expoPushToken); //item.push_token
|
|
124
|
+ onPress={() => {
|
|
125
|
+ console.log("date");
|
147
|
126
|
}}
|
148
|
127
|
>
|
149
|
128
|
<List.Item
|