bigbluebutton-Github/bigbluebutton-html5/imports/ui/components/actions-bar/container.jsx
Anton Georgiev 5087e5b24b Handle audio on refactored modal (#2)
* handle audio on refactored modal

* wrap component with withModalMounter
2017-05-02 13:18:01 -04:00

38 lines
1.0 KiB
JavaScript
Executable File

import React, { Component } from 'react';
import { createContainer } from 'meteor/react-meteor-data';
import { withModalMounter } from '/imports/ui/components/modal/service';
import ActionsBar from './component';
import Service from './service';
import AudioService from '../audio/service';
import AudioModal from '../audio/audio-modal/component';
class ActionsBarContainer extends Component {
constructor(props) {
super(props);
}
render() {
return (
<ActionsBar
{...this.props}>
{this.props.children}
</ActionsBar>
);
}
}
export default withModalMounter(createContainer(({ mountModal }) => {
const isPresenter = Service.isUserPresenter();
const handleExitAudio = () => AudioService.exitAudio();
const handleOpenJoinAudio = () =>
mountModal(<AudioModal handleJoinListenOnly={AudioService.joinListenOnly} />);
return {
isUserPresenter: isPresenter,
handleExitAudio: handleExitAudio,
handleOpenJoinAudio: handleOpenJoinAudio,
};
}, ActionsBarContainer));