bigbluebutton-Github/bigbluebutton-html5/imports/ui/components/audio/audio-menu/container.jsx
Oleksandr Zhurbenko 251bd22738 PR review fixes
2017-09-06 12:36:52 -07:00

22 lines
692 B
JavaScript

import React from 'react';
import { createContainer } from 'meteor/react-meteor-data';
import VoiceUsers from '/imports/api/2.0/voice-users';
import Auth from '/imports/ui/services/auth/index';
import JoinAudioOptions from './component';
const JoinAudioOptionsContainer = props => (<JoinAudioOptions {...props} />);
export default createContainer((params) => {
const userId = Auth.userID;
const voiceUser = VoiceUsers.findOne({ intId: userId });
const { joined, listenOnly } = voiceUser;
return {
isInAudio: joined,
isInListenOnly: listenOnly,
handleJoinAudio: params.handleJoinAudio,
handleCloseAudio: params.handleCloseAudio,
};
}, JoinAudioOptionsContainer);