bigbluebutton-Github/bigbluebutton-html5/imports/ui/components/logout-confirmation/container.jsx

26 lines
853 B
React
Raw Normal View History

2017-09-22 02:50:21 +08:00
import React from 'react';
import { meetingIsBreakout } from '/imports/ui/components/app/service';
import { withTracker } from 'meteor/react-meteor-data';
2018-04-26 03:34:22 +08:00
import { withRouter } from 'react-router';
2017-08-12 04:32:33 +08:00
import LogoutConfirmation from './component';
import {
isModerator,
endMeeting,
} from './service';
2017-08-12 04:32:33 +08:00
const LogoutConfirmationContainer = props => (
<LogoutConfirmation {...props} />
2017-09-22 02:50:21 +08:00
);
2017-08-12 04:32:33 +08:00
export default withRouter(withTracker(({ router }) => {
2018-04-26 03:34:22 +08:00
const APP_CONFIG = Meteor.settings.public.app;
const shouldShowFeedback = !meetingIsBreakout() && APP_CONFIG.askForFeedbackOnLogout;
const showFeedback = shouldShowFeedback ? () => router.push('/ended/430') : () => router.push('/logout');
2018-04-26 03:34:22 +08:00
return {
showEndMeeting: !meetingIsBreakout() && isModerator(),
handleEndMeeting: endMeeting,
showFeedback,
};
})(LogoutConfirmationContainer));