bigbluebutton-Github/bigbluebutton-html5/imports/ui/components/note/container.jsx
Vitor Mateus De Almeida 1326f3f791 Add New Layout Manager
2021-05-17 17:25:07 -03:00

25 lines
707 B
JavaScript

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