bigbluebutton-Github/bigbluebutton-html5/imports/ui/components/user-list/container.jsx

36 lines
1.2 KiB
React
Raw Normal View History

import React, { useEffect, useState } from 'react';
import getFromUserSettings from '/imports/ui/services/users-settings';
import { isDarkThemeEnabled } from '/imports/ui/components/app/service';
2017-07-12 21:18:26 +08:00
import UserList from './component';
import { useStorageKey } from '../../services/storage/hooks';
2016-05-20 02:22:56 +08:00
const UserListContainer = (props) => {
const CustomLogoUrl = useStorageKey('CustomLogoUrl', 'session');
const CustomDarkLogoUrl = useStorageKey('CustomDarkLogoUrl', 'session');
const [DarkModeIsEnabled, setDarkModeIsEnabled] = useState(isDarkThemeEnabled());
useEffect(() => {
const handleDarkModeChange = (event) => {
setDarkModeIsEnabled(event.detail.enabled);
};
window.addEventListener('darkmodechange', handleDarkModeChange);
return () => {
window.removeEventListener('darkmodechange', handleDarkModeChange);
};
}, []);
return (
2024-06-11 02:59:32 +08:00
<UserList
CustomLogoUrl={CustomLogoUrl}
CustomDarkLogoUrl={CustomDarkLogoUrl}
DarkModeIsEnabled={DarkModeIsEnabled}
2024-06-11 02:59:32 +08:00
{...props}
showBranding={getFromUserSettings('bbb_display_branding_area', window.meetingClientSettings.public.app.branding.displayBrandingArea)}
/>
);
};
2016-05-20 02:22:56 +08:00
2024-06-11 02:59:32 +08:00
export default UserListContainer;