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

27 lines
1001 B
React
Raw Normal View History

2022-06-22 21:17:59 +08:00
import React, { useContext } from 'react';
2021-05-18 04:25:07 +08:00
import SidebarContent from './component';
2021-09-11 04:48:52 +08:00
import { layoutSelectInput, layoutSelectOutput, layoutDispatch } from '../layout/context';
2022-06-22 21:17:59 +08:00
import { UsersContext } from '../components-data/users-context/context';
import Auth from '/imports/ui/services/auth';
2021-05-18 04:25:07 +08:00
const SidebarContentContainer = () => {
2021-09-11 04:48:52 +08:00
const sidebarContentInput = layoutSelectInput((i) => i.sidebarContent);
const sidebarContentOutput = layoutSelectOutput((i) => i.sidebarContent);
const layoutContextDispatch = layoutDispatch();
const { sidebarContentPanel } = sidebarContentInput;
2022-06-22 21:17:59 +08:00
const usingUsersContext = useContext(UsersContext);
const { users } = usingUsersContext;
const amIPresenter = users[Auth.meetingID][Auth.userID].presenter;
2021-05-18 04:25:07 +08:00
return (
<SidebarContent
{...sidebarContentOutput}
2021-09-11 04:48:52 +08:00
contextDispatch={layoutContextDispatch}
2021-05-18 04:25:07 +08:00
sidebarContentPanel={sidebarContentPanel}
2022-06-22 21:17:59 +08:00
amIPresenter={amIPresenter}
2021-05-18 04:25:07 +08:00
/>
);
};
export default SidebarContentContainer;