bigbluebutton-Github/bigbluebutton-html5/imports/ui/components/logout-confirmation/container.jsx
2018-09-13 15:09:30 -03:00

27 lines
971 B
JavaScript
Executable File

import React from 'react';
import { meetingIsBreakout } from '/imports/ui/components/app/service';
import { withTracker } from 'meteor/react-meteor-data';
import { withRouter } from 'react-router';
import getFromUserSettings from '/imports/ui/services/users-settings';
import LogoutConfirmation from './component';
import {
isModerator,
endMeeting,
} from './service';
const LogoutConfirmationContainer = props => (
<LogoutConfirmation {...props} />
);
export default withRouter(withTracker(({ router }) => {
const APP_CONFIG = Meteor.settings.public.app;
const shouldShowFeedback = !meetingIsBreakout() && getFromUserSettings('askForFeedbackOnLogout', APP_CONFIG.askForFeedbackOnLogout);
const showFeedback = shouldShowFeedback ? () => router.push('/ended/430') : () => router.push('/logout');
return {
showEndMeeting: !meetingIsBreakout() && isModerator(),
handleEndMeeting: endMeeting,
showFeedback,
};
})(LogoutConfirmationContainer));