bigbluebutton-Github/bigbluebutton-html5/imports/ui/components/poll/live-result/container.jsx
2018-10-15 19:05:50 +00:00

25 lines
689 B
JavaScript

import React from 'react';
import Users from '/imports/api/users';
import Polls from '/imports/api/polls';
import Auth from '/imports/ui/services/auth';
import { withTracker } from 'meteor/react-meteor-data';
import LiveResult from './component';
const LiveResultContainer = ({ ...props }) => <LiveResult {...props} />;
export default withTracker(({ }) => {
Meteor.subscribe('current-poll', Auth.meetingID);
const getUser = userId => Users.findOne({ userId });
const currentUser = Users.findOne({ userId: Auth.userID });
const currentPoll = Polls.findOne({ meetingId: Auth.meetingID });
return {
getUser,
currentUser,
currentPoll,
};
})(LiveResultContainer);