mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
8ca159b4b9
PDF Detach GitOrigin-RevId: f69d8a87d1ba2115ad496a719106dfc7707a6ed5
42 lines
1.4 KiB
JavaScript
42 lines
1.4 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 { CompileProvider } from './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'
|
|
|
|
export function ContextRoot({ children, ide, settings }) {
|
|
return (
|
|
<SplitTestProvider>
|
|
<IdeProvider ide={ide}>
|
|
<UserProvider>
|
|
<ProjectProvider>
|
|
<EditorProvider settings={settings}>
|
|
<DetachProvider>
|
|
<LayoutProvider>
|
|
<CompileProvider>
|
|
<ChatProvider>{children}</ChatProvider>
|
|
</CompileProvider>
|
|
</LayoutProvider>
|
|
</DetachProvider>
|
|
</EditorProvider>
|
|
</ProjectProvider>
|
|
</UserProvider>
|
|
</IdeProvider>
|
|
</SplitTestProvider>
|
|
)
|
|
}
|
|
|
|
ContextRoot.propTypes = {
|
|
children: PropTypes.any,
|
|
ide: PropTypes.any.isRequired,
|
|
settings: PropTypes.any.isRequired,
|
|
}
|
|
|
|
export const rootContext = createSharedContext(ContextRoot)
|