2021-01-20 01:06:32 +08:00
|
|
|
import React from 'react';
|
2021-09-11 04:48:52 +08:00
|
|
|
import { LayoutContextProvider } from '/imports/ui/components/layout/context';
|
2022-04-12 01:09:13 +08:00
|
|
|
import { CustomBackgroundsProvider } from '/imports/ui/components/video-preview/virtual-background/context';
|
2024-02-29 03:31:44 +08:00
|
|
|
import { PluginsContextProvider } from '/imports/ui/components/components-data/plugin-context/context';
|
2024-03-09 04:48:44 +08:00
|
|
|
import CurrentUserProvider from '../../core/providers/current-user';
|
2021-01-20 01:06:32 +08:00
|
|
|
|
|
|
|
const providersList = [
|
2021-09-10 21:16:44 +08:00
|
|
|
LayoutContextProvider,
|
2022-04-12 01:09:13 +08:00
|
|
|
CustomBackgroundsProvider,
|
2023-08-16 06:31:11 +08:00
|
|
|
PluginsContextProvider,
|
2024-03-09 04:48:44 +08:00
|
|
|
CurrentUserProvider,
|
2021-01-20 01:06:32 +08:00
|
|
|
];
|
|
|
|
|
2024-02-29 03:31:44 +08:00
|
|
|
const ContextProvidersComponent = (props) => providersList.reduce((acc, Component) => (
|
2021-01-20 01:06:32 +08:00
|
|
|
<Component>
|
|
|
|
{acc}
|
2024-02-29 03:31:44 +08:00
|
|
|
</Component>
|
|
|
|
), props.children);
|
2021-01-20 01:06:32 +08:00
|
|
|
|
|
|
|
export default ContextProvidersComponent;
|