Use new tabs in Help
[MAILPOET-2775]
This commit is contained in:
@@ -1,28 +1,32 @@
|
||||
import React from 'react';
|
||||
import ReactDOM from 'react-dom';
|
||||
import {
|
||||
HashRouter, Route, Redirect, Switch,
|
||||
} from 'react-router-dom';
|
||||
|
||||
import MailPoet from 'mailpoet';
|
||||
import KnowledgeBase from 'help/knowledge_base.jsx';
|
||||
import SystemInfo from 'help/system_info.jsx';
|
||||
import SystemStatus from 'help/system_status.jsx';
|
||||
import YourPrivacy from 'help/your_privacy.jsx';
|
||||
import { GlobalContext, useGlobalContextValue } from 'context/index.jsx';
|
||||
import Notices from 'notices/notices.jsx';
|
||||
import RoutedTabs from '../common/tabs/routed_tabs';
|
||||
import Tab from '../common/tabs/tab';
|
||||
|
||||
const App = () => (
|
||||
<GlobalContext.Provider value={useGlobalContextValue(window)}>
|
||||
<HashRouter>
|
||||
<Notices />
|
||||
<Switch>
|
||||
<Route exact path="/" render={() => <Redirect to="/knowledgeBase" />} />
|
||||
<Route path="/knowledgeBase" component={KnowledgeBase} />
|
||||
<Route path="/systemStatus" component={SystemStatus} />
|
||||
<Route path="/systemInfo" component={SystemInfo} />
|
||||
<Route path="/yourPrivacy" component={YourPrivacy} />
|
||||
</Switch>
|
||||
</HashRouter>
|
||||
<Notices />
|
||||
<RoutedTabs activeKey="knowledgeBase">
|
||||
<Tab key="knowledgeBase" title={MailPoet.I18n.t('tabKnowledgeBaseTitle')}>
|
||||
<KnowledgeBase />
|
||||
</Tab>
|
||||
<Tab key="systemStatus" title={MailPoet.I18n.t('tabSystemStatusTitle')}>
|
||||
<SystemStatus />
|
||||
</Tab>
|
||||
<Tab key="systemInfo" title={MailPoet.I18n.t('tabSystemInfoTitle')}>
|
||||
<SystemInfo />
|
||||
</Tab>
|
||||
<Tab key="yourPrivacy" title={MailPoet.I18n.t('tabYourPrivacyTitle')}>
|
||||
<YourPrivacy />
|
||||
</Tab>
|
||||
</RoutedTabs>
|
||||
</GlobalContext.Provider>
|
||||
);
|
||||
|
||||
|
Reference in New Issue
Block a user