bigbluebutton-Github/bigbluebutton-html5/imports/ui/components/banner-bar/container.jsx

17 lines
626 B
React
Raw Normal View History

import React from 'react';
2019-03-16 04:07:14 +08:00
import BannerComponent from './component';
2021-09-11 04:48:52 +08:00
import { layoutSelectInput, layoutDispatch } from '../layout/context';
import { useStorageKey } from '../../services/storage/hooks';
2021-07-12 21:22:26 +08:00
const BannerContainer = (props) => {
2021-09-11 04:48:52 +08:00
const bannerBar = layoutSelectInput((i) => i.bannerBar);
2021-07-12 21:22:26 +08:00
const { hasBanner } = bannerBar;
2021-09-11 04:48:52 +08:00
const layoutContextDispatch = layoutDispatch();
const color = useStorageKey('bannerColor') || '#0F70D7';
const text = useStorageKey('bannerText') || '';
2021-07-12 21:22:26 +08:00
return <BannerComponent {...{ hasBanner, layoutContextDispatch, color, text, ...props }} />;
2021-07-12 21:22:26 +08:00
};
2019-03-16 04:07:14 +08:00
export default BannerContainer;