2021-01-20 01:06:32 +08:00
|
|
|
import React from 'react';
|
|
|
|
import { ChatContextProvider } from '/imports/ui/components/components-data/chat-context/context';
|
|
|
|
import { UsersContextProvider } from '/imports/ui/components/components-data/users-context/context';
|
2021-02-02 06:12:04 +08:00
|
|
|
import { GroupChatContextProvider } from '/imports/ui/components/components-data/group-chat-context/context';
|
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';
|
2021-01-20 01:06:32 +08:00
|
|
|
|
|
|
|
const providersList = [
|
|
|
|
ChatContextProvider,
|
2021-02-02 06:12:04 +08:00
|
|
|
GroupChatContextProvider,
|
2021-01-20 01:06:32 +08:00
|
|
|
UsersContextProvider,
|
2021-09-10 21:16:44 +08:00
|
|
|
LayoutContextProvider,
|
2022-04-12 01:09:13 +08:00
|
|
|
CustomBackgroundsProvider,
|
2021-01-20 01:06:32 +08:00
|
|
|
];
|
|
|
|
|
|
|
|
const ContextProvidersComponent = props => providersList.reduce((acc, Component) => (
|
|
|
|
<Component>
|
|
|
|
{acc}
|
|
|
|
</Component>), props.children);
|
|
|
|
|
|
|
|
export default ContextProvidersComponent;
|