1firestoreConnect((props) => {
2 let propertyDocRef = firebase.firestore().collection('properties').doc(props.propertyId)
3 if (!props.propertyId) return []
4 return [
5 {
6 collection : 'properties',
7 doc : props.propertyId,
8 subcollections : [
9 { collection: 'tasks' }
10 ],
11 storeAs : 'tasks',
12 orderBy : [
13 'createdAt',
14 'desc'
15 ]
16 },
17 {
18 collection : 'likes',
19 where : [
20 [
21 'property',
22 '==',
23 propertyDocRef
24 ]
25 ]
26 }
27 ]
28 })