mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-05-28 11:31:55 +02:00
* Created ng-controller for react shared context and set editor.loading * toolbar-header component with menu button (and story) * Added editor-navigation-toolbar-root and react2angular plumbing * Added eslint-disable exception to use <a/> instead of <button/> * added 'menu' to extracted translation * [ReactNavToolbar] Added cobranding and back to projects buttons (#3515) GitOrigin-RevId: 27c3bba85cbc96a123d58c66a0bd5d6a2cfd8aca
21 lines
587 B
JavaScript
21 lines
587 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'
|
|
|
|
export function ContextRoot({ children, editorLoading }) {
|
|
return (
|
|
<ApplicationProvider>
|
|
<EditorProvider loading={editorLoading}>{children}</EditorProvider>
|
|
</ApplicationProvider>
|
|
)
|
|
}
|
|
|
|
ContextRoot.propTypes = {
|
|
children: PropTypes.any,
|
|
editorLoading: PropTypes.bool
|
|
}
|
|
|
|
export const rootContext = createSharedContext(ContextRoot)
|