fix timer panel
This commit is contained in:
parent
be8f4572da
commit
2378494a70
@ -145,7 +145,7 @@ const SidebarContent = (props) => {
|
||||
)}
|
||||
{sidebarContentPanel === PANELS.CAPTIONS && <CaptionsContainer amIModerator={amIModerator} />}
|
||||
{sidebarContentPanel === PANELS.BREAKOUT && <BreakoutRoomContainer />}
|
||||
{sidebarContentPanel === PANELS.TIMER && <TimerContainer />}
|
||||
{sidebarContentPanel === PANELS.TIMER && <TimerContainer isModerator={amIModerator} />}
|
||||
{sidebarContentPanel === PANELS.WAITING_USERS && <GuestUsersManagementPanel />}
|
||||
{sidebarContentPanel === PANELS.POLL && (
|
||||
<Styled.Poll
|
||||
|
@ -3,20 +3,14 @@ import { withTracker } from 'meteor/react-meteor-data';
|
||||
import Timer from './component';
|
||||
import Service from './service';
|
||||
import { layoutSelectInput, layoutDispatch } from '/imports/ui/components/layout/context';
|
||||
import useCurrentUser from '/imports/ui/core/hooks/useCurrentUser';
|
||||
|
||||
const TimerContainer = ({ children, ...props }) => {
|
||||
const layoutContextDispatch = layoutDispatch();
|
||||
const cameraDock = layoutSelectInput((i) => i.cameraDock);
|
||||
const { isResizing } = cameraDock;
|
||||
const { data: currentUserData } = useCurrentUser((user) => ({
|
||||
isModerator: user.isModerator,
|
||||
}));
|
||||
|
||||
const isModerator = currentUserData?.isModerator;
|
||||
|
||||
return (
|
||||
<Timer {...{ layoutContextDispatch, isResizing, isModerator, ...props }}>
|
||||
<Timer {...{ layoutContextDispatch, isResizing, ...props }}>
|
||||
{children}
|
||||
</Timer>
|
||||
);
|
||||
|
Loading…
Reference in New Issue
Block a user