mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-21 20:47:08 -05:00
d55e46d3c0
[ReactNavToolbar] Track changes and History toggle buttons. GitOrigin-RevId: a67a9a488c0960dba3f3d374cde4db0080ed2952
26 lines
813 B
JavaScript
26 lines
813 B
JavaScript
import React from 'react'
|
|
import PropTypes from 'prop-types'
|
|
import { ApplicationProvider } from './application-context'
|
|
import { EditorProvider } from './editor-context'
|
|
import createSharedContext from 'react2angular-shared-context'
|
|
import { ChatProvider } from '../../features/chat/context/chat-context'
|
|
import { LayoutProvider } from './layout-context'
|
|
|
|
export function ContextRoot({ children, ide }) {
|
|
return (
|
|
<ApplicationProvider>
|
|
<EditorProvider $scope={ide.$scope}>
|
|
<LayoutProvider $scope={ide.$scope}>
|
|
<ChatProvider>{children}</ChatProvider>
|
|
</LayoutProvider>
|
|
</EditorProvider>
|
|
</ApplicationProvider>
|
|
)
|
|
}
|
|
|
|
ContextRoot.propTypes = {
|
|
children: PropTypes.any,
|
|
ide: PropTypes.any.isRequired
|
|
}
|
|
|
|
export const rootContext = createSharedContext(ContextRoot)
|