mirror of
https://github.com/overleaf/overleaf.git
synced 2024-10-31 21:21:03 -04:00
3c01402bbd
PDF Detach v2 GitOrigin-RevId: 3deb76474185f9176cde23ab32ef51b90df6e8e9
48 lines
1.7 KiB
JavaScript
48 lines
1.7 KiB
JavaScript
import PropTypes from 'prop-types'
|
|
import createSharedContext from 'react2angular-shared-context'
|
|
|
|
import { UserProvider } from './user-context'
|
|
import { IdeProvider } from './ide-context'
|
|
import { EditorProvider } from './editor-context'
|
|
import { LocalCompileProvider } from './local-compile-context'
|
|
import { DetachCompileProvider } from './detach-compile-context'
|
|
import { LayoutProvider } from './layout-context'
|
|
import { DetachProvider } from './detach-context'
|
|
import { ChatProvider } from '../../features/chat/context/chat-context'
|
|
import { ProjectProvider } from './project-context'
|
|
import { SplitTestProvider } from './split-test-context'
|
|
import { FileTreeDataProvider } from './file-tree-data-context'
|
|
|
|
export function ContextRoot({ children, ide, settings }) {
|
|
return (
|
|
<SplitTestProvider>
|
|
<IdeProvider ide={ide}>
|
|
<UserProvider>
|
|
<ProjectProvider>
|
|
<FileTreeDataProvider>
|
|
<EditorProvider settings={settings}>
|
|
<DetachProvider>
|
|
<LayoutProvider>
|
|
<LocalCompileProvider>
|
|
<DetachCompileProvider>
|
|
<ChatProvider>{children}</ChatProvider>
|
|
</DetachCompileProvider>
|
|
</LocalCompileProvider>
|
|
</LayoutProvider>
|
|
</DetachProvider>
|
|
</EditorProvider>
|
|
</FileTreeDataProvider>
|
|
</ProjectProvider>
|
|
</UserProvider>
|
|
</IdeProvider>
|
|
</SplitTestProvider>
|
|
)
|
|
}
|
|
|
|
ContextRoot.propTypes = {
|
|
children: PropTypes.any,
|
|
ide: PropTypes.object,
|
|
settings: PropTypes.object,
|
|
}
|
|
|
|
export const rootContext = createSharedContext(ContextRoot)
|