bigbluebutton-Github/bigbluebutton-html5/imports/ui/components/polling/container.jsx
2016-07-07 10:08:26 -07:00

20 lines
523 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} />;
} else {
return null;
}
}
}
export default createContainer(() => {
const data = PollingService.mapPolls();
return data;
}, PollingContainer);