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

25 lines
681 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 } = layoutContext;
return (
<Note {...{ layoutContextDispatch, ...props }}>
{children}
</Note>
);
};
export default withTracker(() => {
const isLocked = NoteService.isLocked();
const isRTL = document.documentElement.getAttribute('dir') === 'rtl';
return {
isLocked,
isRTL,
};
})(NoteContainer);