bigbluebutton-Github/bigbluebutton-html5/imports/ui/components/fullscreen-button/container.jsx
2021-08-05 01:22:07 -03:00

30 lines
889 B
JavaScript

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