Add help without any content

[MAILPOET-949]
This commit is contained in:
Pavel Dohnal
2017-06-28 15:00:53 +01:00
parent 2add301b9f
commit 43fa12ec08
7 changed files with 157 additions and 0 deletions

View File

@@ -0,0 +1,34 @@
import React from 'react'
import ReactDOM from 'react-dom'
import { Router, Route, IndexRedirect, useRouterHistory } from 'react-router'
import { createHashHistory } from 'history'
import KnowledgeBase from 'help/knowledge_base.jsx'
import SystemInfo from 'help/system_info.jsx'
const history = useRouterHistory(createHashHistory)({ queryKey: false });
const App = React.createClass({
render() {
return this.props.children;
}
});
const container = document.getElementById('mailpoet_help');
if(container) {
const mailpoet_listing = ReactDOM.render((
<Router history={ history }>
<Route path="/" component={ App }>
<IndexRedirect to="knowledgeBase" />
{/* Listings */}
<Route path="knowledgeBase(/)**" params={{ tab: 'knowledgeBase' }} component={ KnowledgeBase } />
<Route path="systemInfo(/)**" params={{ tab: 'systemInfo' }} component={ SystemInfo } />
</Route>
</Router>
), container);
window.mailpoet_listing = mailpoet_listing;
}