bigbluebutton-Github/bigbluebutton-html5/imports/ui/components/logout-confirmation/container.jsx
2018-10-12 21:14:28 +00:00

28 lines
704 B
JavaScript
Executable File

import React from 'react';
import { meetingIsBreakout } from '/imports/ui/components/app/service';
import { withTracker } from 'meteor/react-meteor-data';
import { Session } from 'meteor/session';
import LogoutConfirmation from './component';
import {
isModerator,
endMeeting,
} from './service';
const LogoutConfirmationContainer = props => (
<LogoutConfirmation {...props} />
);
export default withTracker(() => {
const confirmLeaving = () => {
Session.set('isMeetingEnded', true);
Session.set('codeError', '430');
};
return {
showEndMeeting: !meetingIsBreakout() && isModerator(),
handleEndMeeting: endMeeting,
confirmLeaving,
};
})(LogoutConfirmationContainer);