bigbluebutton-Github/bigbluebutton-html5/imports/ui/components/timer/container.jsx
Arthurk12 0d06241a68 feat(timer): port to 2.5
Port timer feature to 2.5 which includes 3 components:
	- Timer component
	- Timer indicator component
	- Timer sidebar button component
2023-05-18 15:29:39 -03:00

29 lines
901 B
JavaScript

import React from 'react';
import { withTracker } from 'meteor/react-meteor-data';
import Timer from './component';
import Service from './service';
import { layoutSelectInput, layoutDispatch } from '/imports/ui/components/layout/context';
const TimerContainer = ({ children, ...props }) => {
const layoutContextDispatch = layoutDispatch();
const cameraDock = layoutSelectInput((i) => i.cameraDock);
const { isResizing } = cameraDock;
return (
<Timer {...{ layoutContextDispatch, isResizing, ...props }}>
{children}
</Timer>
);
}
export default withTracker(() => {
const isRTL = document.documentElement.getAttribute('dir') === 'rtl';
return {
isRTL,
isActive: Service.isActive(),
isModerator: Service.isModerator(),
timeOffset: Service.getTimeOffset(),
timer: Service.getTimer(),
currentTrack: Service.getCurrentTrack(),
};
})(TimerContainer);