bigbluebutton-Github/bigbluebutton-html5/imports/ui/components/captions/writer-menu/container.jsx

19 lines
798 B
React
Raw Normal View History

2021-05-18 04:25:07 +08:00
import React, { useContext } from 'react';
import { withTracker } from 'meteor/react-meteor-data';
import { withModalMounter } from '/imports/ui/components/modal/service';
import CaptionsService from '/imports/ui/components/captions/service';
import WriterMenu from './component';
2021-08-05 19:03:24 +08:00
import LayoutContext from '../../layout/context';
2021-05-18 04:25:07 +08:00
const WriterMenuContainer = (props) => {
2021-08-05 19:03:24 +08:00
const layoutContext = useContext(LayoutContext);
const { layoutContextDispatch } = layoutContext;
return <WriterMenu {...{ layoutContextDispatch, ...props }} />;
2021-05-18 04:25:07 +08:00
};
export default withModalMounter(withTracker(({ mountModal }) => ({
closeModal: () => mountModal(null),
allLocales: CaptionsService.getAvailableLocales(),
2021-08-09 22:24:02 +08:00
takeOwnership: (locale) => CaptionsService.takeOwnership(locale),
}))(WriterMenuContainer));