mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
f27562eb12
- Importing SettingsController from the angular code, which enables post requests for every select menu and socket handler for compiler, texlive version, and main document select option - New context for the data handling infrastructure between react and angular. The data is still located in the angular version, and I use the context only as a proxy to fetch/post new data. GitOrigin-RevId: 59009bceb128d82969a2318e90036aacf79f9887
51 lines
1.9 KiB
JavaScript
51 lines
1.9 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'
|
|
import { ProjectSettingsProvider } from '../../features/editor-left-menu/context/project-settings-context'
|
|
|
|
export function ContextRoot({ children, ide, settings }) {
|
|
return (
|
|
<SplitTestProvider>
|
|
<IdeProvider ide={ide}>
|
|
<UserProvider>
|
|
<ProjectProvider>
|
|
<FileTreeDataProvider>
|
|
<DetachProvider>
|
|
<EditorProvider settings={settings}>
|
|
<ProjectSettingsProvider>
|
|
<LayoutProvider>
|
|
<LocalCompileProvider>
|
|
<DetachCompileProvider>
|
|
<ChatProvider>{children}</ChatProvider>
|
|
</DetachCompileProvider>
|
|
</LocalCompileProvider>
|
|
</LayoutProvider>
|
|
</ProjectSettingsProvider>
|
|
</EditorProvider>
|
|
</DetachProvider>
|
|
</FileTreeDataProvider>
|
|
</ProjectProvider>
|
|
</UserProvider>
|
|
</IdeProvider>
|
|
</SplitTestProvider>
|
|
)
|
|
}
|
|
|
|
ContextRoot.propTypes = {
|
|
children: PropTypes.any,
|
|
ide: PropTypes.object,
|
|
settings: PropTypes.object,
|
|
}
|
|
|
|
export const rootContext = createSharedContext(ContextRoot)
|