user-polls refactor
This commit is contained in:
parent
67f4e44405
commit
b00cc9ea90
@ -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 {
|
||||
? (
|
||||
<WaitingUsersContainer {...{ pendingUsers }} />
|
||||
) : null}
|
||||
<UserPolls isPresenter={currentUser.presenter} />
|
||||
<UserPollsContainer isPresenter={currentUser.presenter} />
|
||||
<BreakoutRoomItem isPresenter={currentUser.presenter} />
|
||||
<UserParticipantsContainer />
|
||||
</Styled.Content>
|
||||
|
@ -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 (
|
||||
<UserPolls
|
||||
{...{
|
||||
sidebarContentPanel,
|
||||
layoutContextDispatch,
|
||||
...props,
|
||||
}}
|
||||
/>
|
||||
);
|
||||
};
|
||||
|
||||
export default withTracker(({ isPresenter }) => ({
|
||||
isPresenter,
|
||||
pollIsOpen: Session.equals('isPollOpen', true),
|
||||
forcePollOpen: Session.equals('forcePollOpen', true),
|
||||
}))(UserPollsContainer);
|
Loading…
Reference in New Issue
Block a user