From b00cc9ea90aa98cbf165e8b983b60ec1c992b35c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ram=C3=B3n=20Souza?= Date: Mon, 6 Dec 2021 19:01:13 +0000 Subject: [PATCH] user-polls refactor --- .../user-list/user-list-content/component.jsx | 4 +-- .../user-polls/container.jsx | 26 +++++++++++++++++++ 2 files changed, 28 insertions(+), 2 deletions(-) create mode 100644 bigbluebutton-html5/imports/ui/components/user-list/user-list-content/user-polls/container.jsx diff --git a/bigbluebutton-html5/imports/ui/components/user-list/user-list-content/component.jsx b/bigbluebutton-html5/imports/ui/components/user-list/user-list-content/component.jsx index 16ffe65d65..558bbf7d75 100755 --- a/bigbluebutton-html5/imports/ui/components/user-list/user-list-content/component.jsx +++ b/bigbluebutton-html5/imports/ui/components/user-list/user-list-content/component.jsx @@ -6,7 +6,7 @@ import UserMessages from './user-messages/container'; import UserNotesContainer from './user-notes/container'; import UserCaptionsContainer from './user-captions/container'; import WaitingUsersContainer from './waiting-users/container'; -import UserPolls from './user-polls/component'; +import UserPollsContainer from './user-polls/container'; import BreakoutRoomItem from './breakout-room/component'; const propTypes = { @@ -37,7 +37,7 @@ class UserContent extends PureComponent { ? ( ) : null} - + diff --git a/bigbluebutton-html5/imports/ui/components/user-list/user-list-content/user-polls/container.jsx b/bigbluebutton-html5/imports/ui/components/user-list/user-list-content/user-polls/container.jsx new file mode 100644 index 0000000000..a840e69a40 --- /dev/null +++ b/bigbluebutton-html5/imports/ui/components/user-list/user-list-content/user-polls/container.jsx @@ -0,0 +1,26 @@ +import React from 'react'; +import { withTracker } from 'meteor/react-meteor-data'; +import UserPolls from './component'; +import { layoutSelectInput, layoutDispatch } from '../../../layout/context'; + +const UserPollsContainer = (props) => { + const sidebarContent = layoutSelectInput((i) => i.sidebarContent); + const { sidebarContentPanel } = sidebarContent; + const layoutContextDispatch = layoutDispatch(); + + return ( + + ); +}; + +export default withTracker(({ isPresenter }) => ({ + isPresenter, + pollIsOpen: Session.equals('isPollOpen', true), + forcePollOpen: Session.equals('forcePollOpen', true), +}))(UserPollsContainer);