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

29 lines
915 B
React
Raw Normal View History

import React from 'react';
import { withTracker } from 'meteor/react-meteor-data';
2024-01-10 22:07:42 +08:00
import { useMutation } from '@apollo/client';
import EndMeetingComponent from './component';
import Service from './service';
import logger from '/imports/startup/client/logger';
2024-01-10 22:07:42 +08:00
import { MEETING_END } from './mutations';
2024-01-10 22:07:42 +08:00
const EndMeetingContainer = (props) => {
const [meetingEnd] = useMutation(MEETING_END);
const { setIsOpen } = props;
2024-01-10 22:07:42 +08:00
const endMeeting = () => {
logger.warn({
logCode: 'moderator_forcing_end_meeting',
extraInfo: { logType: 'user_action' },
}, 'this user clicked on EndMeeting and confirmed, removing everybody from the meeting');
2024-01-10 22:07:42 +08:00
meetingEnd();
setIsOpen(false);
};
return <EndMeetingComponent endMeeting={endMeeting} {...props} />;
};
export default withTracker(() => ({
2021-01-21 04:49:07 +08:00
meetingTitle: Service.getMeetingTitle(),
users: Service.getUsers(),
}))(EndMeetingContainer);