bigbluebutton-Github/bigbluebutton-html5/imports/ui/components/waiting-users/guest-policy/container.jsx
2023-11-30 14:24:25 +01:00

20 lines
654 B
JavaScript

import React from 'react';
import { withTracker } from 'meteor/react-meteor-data';
import GuestPolicyComponent from './component';
import Service from '../service';
import useCurrentUser from '/imports/ui/core/hooks/useCurrentUser';
const GuestPolicyContainer = (props) => {
const { data: currentUserData } = useCurrentUser((user) => ({
isModerator: user.isModerator,
}));
const amIModerator = currentUserData?.isModerator;
return amIModerator && <GuestPolicyComponent {...props} />;
};
export default withTracker(() => ({
guestPolicy: Service.getGuestPolicy(),
changeGuestPolicy: Service.changeGuestPolicy,
}))(GuestPolicyContainer);