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

23 lines
625 B
React
Raw Normal View History

2016-05-07 04:15:47 +08:00
import React from 'react';
import {videoIsBroadcasting} from './service';
2016-05-07 04:15:47 +08:00
import { createContainer } from 'meteor/react-meteor-data';
import DeskshareComponent from './component';
2016-05-07 04:15:47 +08:00
class DeskshareContainer extends React.Component {
render() {
if (this.props.videoIsBroadcasting) {
2016-08-19 22:07:47 +08:00
console.log("gonna render DS component");
2016-05-07 04:15:47 +08:00
return <DeskshareComponent />;
} else {
2016-08-19 22:07:47 +08:00
//return null;
return <p>hello</p>;
2016-05-07 04:15:47 +08:00
}
}
}
export default createContainer(() => {
2016-08-19 22:07:47 +08:00
console.log("inside ds container");
2016-05-07 04:15:47 +08:00
const data = { videoIsBroadcasting: videoIsBroadcasting() };
return data;
}, DeskshareContainer);