fix timer panel

This commit is contained in:
Ramón Souza 2024-01-17 16:00:02 -03:00
parent be8f4572da
commit 2378494a70
2 changed files with 2 additions and 8 deletions

View File

@ -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

View File

@ -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>
);