bigbluebutton-Github/bigbluebutton-html5/imports/ui/components/note/container.jsx
2021-08-19 10:05:25 -03:00

28 lines
822 B
JavaScript

import React, { useContext } from 'react';
import { withTracker } from 'meteor/react-meteor-data';
import Note from './component';
import NoteService from './service';
import LayoutContext from '../layout/context';
const NoteContainer = ({ children, ...props }) => {
const layoutContext = useContext(LayoutContext);
const { layoutContextDispatch, layoutContextState } = layoutContext;
const { input } = layoutContextState;
const { cameraDock } = input;
const { isResizing } = cameraDock;
return (
<Note {...{ layoutContextDispatch, isResizing, ...props }}>
{children}
</Note>
);
};
export default withTracker(() => {
const isLocked = NoteService.isLocked();
const isRTL = document.documentElement.getAttribute('dir') === 'rtl';
return {
isLocked,
isRTL,
};
})(NoteContainer);