bigbluebutton-Github/bigbluebutton-html5/imports/ui/components/polling/container.jsx
2018-01-07 20:44:42 -08:00

26 lines
582 B
JavaScript

import React from 'react';
import PropTypes from 'prop-types';
import { withTracker } from 'meteor/react-meteor-data';
import PollingService from './service';
import PollingComponent from './component';
const propTypes = {
pollExists: PropTypes.bool.isRequired,
};
const PollingContainer = ({ pollExists, ...props }) => {
if (pollExists) {
return (
<PollingComponent {...props} />
);
}
return null;
};
PollingContainer.propTypes = propTypes;
export default withTracker(() => {
const data = PollingService.mapPolls();
return data;
})(PollingContainer);