bigbluebutton-Github/bigbluebutton-html5/imports/ui/components/settings/container.jsx
2021-09-10 17:48:52 -03:00

30 lines
881 B
JavaScript

import React from 'react';
import { withTracker } from 'meteor/react-meteor-data';
import SettingsService from '/imports/ui/services/settings';
import Settings from './component';
import { layoutDispatch } from '../layout/context';
import {
getUserRoles,
showGuestNotification,
updateSettings,
getAvailableLocales,
} from './service';
const SettingsContainer = (props) => {
const layoutContextDispatch = layoutDispatch();
return <Settings {...props} layoutContextDispatch={layoutContextDispatch} />;
};
export default withTracker(() => ({
audio: SettingsService.audio,
dataSaving: SettingsService.dataSaving,
application: SettingsService.application,
updateSettings,
availableLocales: getAvailableLocales(),
isModerator: getUserRoles() === 'MODERATOR',
showGuestNotification: showGuestNotification(),
showToggleLabel: false,
}))(SettingsContainer);