bigbluebutton-Github/bigbluebutton-html5/imports/ui/components/sidebar-content/container.jsx

26 lines
731 B
React
Raw Normal View History

2021-05-18 04:25:07 +08:00
import React from 'react';
import SidebarContent from './component';
2021-08-05 19:03:24 +08:00
import { LayoutContextFunc } from '../layout/context';
2021-05-18 04:25:07 +08:00
const SidebarContentContainer = (props) => {
2021-08-05 19:03:24 +08:00
const { layoutContextState, layoutContextDispatch } = props;
2021-05-18 04:25:07 +08:00
const {
output, input,
2021-08-05 19:03:24 +08:00
} = layoutContextState;
const { sidebarContent: sidebarContentInput } = input;
const { sidebarContentPanel } = sidebarContentInput;
2021-05-18 04:25:07 +08:00
const { sidebarContent } = output;
if (sidebarContent.display === false) return null;
return (
<SidebarContent
{...sidebarContent}
2021-08-05 19:03:24 +08:00
contextDispatch={layoutContextDispatch}
2021-05-18 04:25:07 +08:00
sidebarContentPanel={sidebarContentPanel}
/>
);
};
2021-08-05 19:03:24 +08:00
export default LayoutContextFunc.withConsumer(SidebarContentContainer);