bigbluebutton-Github/bigbluebutton-html5/imports/ui/components/banner-bar/container.jsx
João Victor Nunes 06500be757
refactor(storage): replace Tracker.Dependency with observer hook (#20322)
* refactor(storage): replace Tracker.Dependency with observer hook

* fix(storage): set initial value

* refactor(storage): stop using Meteor's Session singleton
2024-06-06 10:50:03 -03:00

17 lines
626 B
JavaScript

import React from 'react';
import BannerComponent from './component';
import { layoutSelectInput, layoutDispatch } from '../layout/context';
import { useStorageKey } from '../../services/storage/hooks';
const BannerContainer = (props) => {
const bannerBar = layoutSelectInput((i) => i.bannerBar);
const { hasBanner } = bannerBar;
const layoutContextDispatch = layoutDispatch();
const color = useStorageKey('bannerColor') || '#0F70D7';
const text = useStorageKey('bannerText') || '';
return <BannerComponent {...{ hasBanner, layoutContextDispatch, color, text, ...props }} />;
};
export default BannerContainer;