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

16 lines
687 B
React
Raw Normal View History

import React from 'react';
import { withTracker } from 'meteor/react-meteor-data';
2022-02-15 23:54:55 +08:00
import { withModalMounter } from '/imports/ui/components/common/modal/service';
import Service from '/imports/ui/components/captions/service';
import CaptionsReaderMenuContainer from '/imports/ui/components/captions/reader-menu/container';
import CaptionButton from './component';
const Container = (props) => <CaptionButton {...props} />;
export default withModalMounter(withTracker(({ mountModal }) => ({
isActive: Service.isCaptionsActive(),
handleOnClick: () => (Service.isCaptionsActive()
? Service.deactivateCaptions()
: mountModal(<CaptionsReaderMenuContainer />)),
}))(Container));