bigbluebutton-Github/bigbluebutton-html5/imports/ui/components/polling/container.jsx
2017-11-06 10:24:10 -08:00

16 lines
480 B
JavaScript

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