bigbluebutton-Github/bigbluebutton-html5/imports/ui/components/captions/pad/container.jsx
Pedro Beschorner Marin 741122df96 Closed captions cleanup
2019-05-23 11:51:01 -03:00

36 lines
807 B
JavaScript

import React, { PureComponent } from 'react';
import { withTracker } from 'meteor/react-meteor-data';
import { Session } from 'meteor/session';
import Pad from './component';
import CaptionsService from '/imports/ui/components/captions/service';
class PadContainer extends PureComponent {
render() {
return (
<Pad {...this.props}>
{this.props.children}
</Pad>
);
}
}
export default withTracker(() => {
const locale = Session.get('captionsLocale');
const caption = CaptionsService.getCaptions(locale);
const {
padId,
ownerId,
readOnlyPadId,
} = caption;
const { name } = caption ? caption.locale : '';
return {
locale,
name,
ownerId,
padId,
readOnlyPadId,
amIModerator: CaptionsService.amIModerator(),
};
})(PadContainer);