Add context to help entrypoint
[MAILPOET-2389]
This commit is contained in:
committed by
Jack Kitterhing
parent
3345903eaa
commit
76d0dc0d9b
@@ -8,11 +8,10 @@ import KnowledgeBase from 'help/knowledge_base.jsx';
|
|||||||
import SystemInfo from 'help/system_info.jsx';
|
import SystemInfo from 'help/system_info.jsx';
|
||||||
import SystemStatus from 'help/system_status.jsx';
|
import SystemStatus from 'help/system_status.jsx';
|
||||||
import YourPrivacy from 'help/your_privacy.jsx';
|
import YourPrivacy from 'help/your_privacy.jsx';
|
||||||
|
import { GlobalContext, useGlobalContextValue } from 'context/index.jsx';
|
||||||
|
|
||||||
const container = document.getElementById('help_container');
|
const App = () => (
|
||||||
|
<GlobalContext.Provider value={useGlobalContextValue(window)}>
|
||||||
if (container) {
|
|
||||||
ReactDOM.render((
|
|
||||||
<HashRouter>
|
<HashRouter>
|
||||||
<Switch>
|
<Switch>
|
||||||
<Route exact path="/" render={() => <Redirect to="/knowledgeBase" />} />
|
<Route exact path="/" render={() => <Redirect to="/knowledgeBase" />} />
|
||||||
@@ -22,5 +21,11 @@ if (container) {
|
|||||||
<Route path="/yourPrivacy" component={YourPrivacy} />
|
<Route path="/yourPrivacy" component={YourPrivacy} />
|
||||||
</Switch>
|
</Switch>
|
||||||
</HashRouter>
|
</HashRouter>
|
||||||
), container);
|
</GlobalContext.Provider>
|
||||||
|
);
|
||||||
|
|
||||||
|
const container = document.getElementById('help_container');
|
||||||
|
|
||||||
|
if (container) {
|
||||||
|
ReactDOM.render(<App />, container);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user