Blame view
imports/ui/containers/documents-list.js
554 Bytes
d1f05315d
|
1 2 3 |
import { composeWithTracker } from 'react-komposer'; import { Documents } from '../../api/documents/documents.js'; import { DocumentsList } from '../components/documents-list.js'; |
aae5ce922
|
4 |
import { Loading } from '../components/loading.js'; |
cac7cbc73
|
5 |
import { Meteor } from 'meteor/meteor'; |
d1f05315d
|
6 |
|
cac7cbc73
|
7 |
const composer = (params, onData) => { |
f0c912bf1
|
8 9 10 |
const subscription = Meteor.subscribe('documents'); if (subscription.ready()) { const documents = Documents.find().fetch(); |
cac7cbc73
|
11 |
onData(null, { documents }); |
d1f05315d
|
12 13 |
} }; |
aae5ce922
|
14 |
export default composeWithTracker(composer, Loading)(DocumentsList); |