bigbluebutton-Github/bigbluebutton-html5/imports/ui/components/polling/container.jsx

19 lines
508 B
React
Raw Normal View History

2016-05-06 02:50:18 +08:00
import React from 'react';
import PollingService from './service';
2016-05-06 02:50:18 +08:00
import { createContainer } from 'meteor/react-meteor-data';
import PollingComponent from './component';
2016-05-06 02:50:18 +08:00
class PollingContainer extends React.Component {
render() {
if (this.props.pollExists) {
return <PollingComponent poll={this.props.poll} handleVote={this.props.handleVote} />;
}
2017-06-03 03:25:02 +08:00
return null;
2016-05-06 02:50:18 +08:00
}
}
export default createContainer(() => {
const data = PollingService.mapPolls();
return data;
}, PollingContainer);