bigbluebutton-Github/bigbluebutton-html5/imports/ui/components/polling/container.jsx
2017-06-02 19:25:02 +00:00

19 lines
508 B
JavaScript
Executable File

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