bigbluebutton-Github/bigbluebutton-html5/imports/ui/components/polling/container.jsx
2017-10-10 10:06:34 -03:00

14 lines
464 B
JavaScript

import React from 'react';
import { createContainer } from 'meteor/react-meteor-data';
import PollingService from './service';
import PollingComponent from './component';
const PollingContainer = (props, { pollExists, poll, handleVote }) => {
if (!pollExists) return null;
return <PollingComponent poll={poll} handleVote={handleVote} />;
};
export default createContainer(() => {
const data = PollingService.mapPolls();
return data;
}, PollingContainer);