jiti-meet/react/features/app/components/App.web.js

73 lines
1.9 KiB
JavaScript
Raw Normal View History

import { AtlasKitThemeProvider } from '@atlaskit/theme';
import React, { Fragment } from 'react';
import GlobalStyles from '../../base/ui/components/GlobalStyles.web';
2022-08-01 07:04:23 +00:00
import JitsiThemeProvider from '../../base/ui/components/JitsiThemeProvider.web';
import DialogContainer from '../../base/ui/components/web/DialogContainer';
import { ChromeExtensionBanner } from '../../chrome-extension-banner';
import OverlayContainer from '../../overlay/components/web/OverlayContainer';
2017-07-21 21:12:02 +00:00
import { AbstractApp } from './AbstractApp';
// Register middlewares and reducers.
import '../middlewares';
import '../reducers';
/**
* Root app {@code Component} on Web/React.
*
2021-11-04 21:10:43 +00:00
* @augments AbstractApp
*/
export class App extends AbstractApp {
/**
* Creates an extra {@link ReactElement}s to be added (unconditionally)
* alongside the main element.
*
* @abstract
* @protected
* @returns {ReactElement}
*/
_createExtraElement() {
return (
<Fragment>
<OverlayContainer />
</Fragment>
);
}
/**
* Overrides the parent method to inject {@link AtlasKitThemeProvider} as
* the top most component.
*
* @override
*/
_createMainElement(component, props) {
return (
<JitsiThemeProvider>
<AtlasKitThemeProvider mode = 'dark'>
<GlobalStyles />
<ChromeExtensionBanner />
{ super._createMainElement(component, props) }
</AtlasKitThemeProvider>
</JitsiThemeProvider>
);
}
/**
* Renders the platform specific dialog container.
*
* @returns {React$Element}
*/
_renderDialogContainer() {
return (
<JitsiThemeProvider>
<AtlasKitThemeProvider mode = 'dark'>
<DialogContainer />
</AtlasKitThemeProvider>
</JitsiThemeProvider>
);
}
}