breakout-room refactor

This commit is contained in:
Ramón Souza 2021-12-06 20:03:04 +00:00
parent b00cc9ea90
commit 94eadd415b
2 changed files with 19 additions and 2 deletions

View File

@ -0,0 +1,17 @@
import React from 'react';
import { withTracker } from 'meteor/react-meteor-data';
import Service from '/imports/ui/components/user-list/service';
import BreakoutRoomItem from './component';
import { layoutSelectInput, layoutDispatch } from '../../../layout/context';
const BreakoutRoomContainer = ({ hasBreakoutRoom }) => {
const sidebarContent = layoutSelectInput((i) => i.sidebarContent);
const { sidebarContentPanel } = sidebarContent;
const layoutContextDispatch = layoutDispatch();
return <BreakoutRoomItem {...{ layoutContextDispatch, sidebarContentPanel, hasBreakoutRoom }} />;
};
export default withTracker(() => ({
hasBreakoutRoom: Service.hasBreakoutRoom(),
}))(BreakoutRoomContainer);

View File

@ -7,7 +7,7 @@ import UserNotesContainer from './user-notes/container';
import UserCaptionsContainer from './user-captions/container';
import WaitingUsersContainer from './waiting-users/container';
import UserPollsContainer from './user-polls/container';
import BreakoutRoomItem from './breakout-room/component';
import BreakoutRoomContainer from './breakout-room/container';
const propTypes = {
currentUser: PropTypes.shape({}).isRequired,
@ -38,7 +38,7 @@ class UserContent extends PureComponent {
<WaitingUsersContainer {...{ pendingUsers }} />
) : null}
<UserPollsContainer isPresenter={currentUser.presenter} />
<BreakoutRoomItem isPresenter={currentUser.presenter} />
<BreakoutRoomContainer />
<UserParticipantsContainer />
</Styled.Content>
);