bigbluebutton-Github/bigbluebutton-html5/imports/ui/components/fullscreen-button/container.jsx
Vitor Mateus De Almeida 145ca61d40 linting some files
2021-08-09 11:24:02 -03:00

29 lines
814 B
JavaScript

import React, { useContext } from 'react';
import FullscreenButtonComponent from './component';
import LayoutContext from '../layout/context';
const FullscreenButtonContainer = (props) => <FullscreenButtonComponent {...props} />;
export default (props) => {
const isIphone = !!(navigator.userAgent.match(/iPhone/i));
const layoutContext = useContext(LayoutContext);
const { layoutContextState, layoutContextDispatch } = layoutContext;
const { fullscreen } = layoutContextState;
const { element: currentElement, group: currentGroup } = fullscreen;
const isFullscreen = !!currentElement;
return (
<FullscreenButtonContainer
{...props}
{...{
isIphone,
isFullscreen,
currentElement,
currentGroup,
layoutContextDispatch,
}}
/>
);
};