bigbluebutton-Github/bigbluebutton-html5/imports/ui/components/layout/modal/container.jsx

35 lines
1.1 KiB
React
Raw Normal View History

import React from 'react';
import LayoutModalComponent from './component';
import { updateSettings } from '/imports/ui/components/settings/service';
2024-01-30 21:03:11 +08:00
import useUserChangedLocalSettings from '/imports/ui/services/settings/hooks/useUserChangedLocalSettings';
import useSettings from '/imports/ui/services/settings/hooks/useSettings';
import { SETTINGS } from '/imports/ui/services/settings/enums';
import useCurrentUser from '/imports/ui/core/hooks/useCurrentUser';
const LayoutModalContainer = (props) => {
const {
intl, setIsOpen, onRequestClose, isOpen, amIModerator,
} = props;
2024-01-30 21:03:11 +08:00
const setLocalSettings = useUserChangedLocalSettings();
const application = useSettings(SETTINGS.APPLICATION);
const { data: currentUser } = useCurrentUser((u) => ({
presenter: u.presenter,
}));
return (
<LayoutModalComponent {...{
intl,
setIsOpen,
isModerator: amIModerator,
isPresenter: currentUser?.presenter ?? false,
application,
updateSettings,
onRequestClose,
isOpen,
setLocalSettings,
}}
/>
);
};
export default LayoutModalContainer;