Swap tabs in help section

We decided to make the Knowledge Base tab the default one since it contains the information
which are easiest to understand for an user.

[MAILPOET-1457]
This commit is contained in:
Rostislav Wolny
2018-07-23 16:26:54 +02:00
parent 5f6fe1a7e5
commit a8bfadf157
2 changed files with 8 additions and 8 deletions

View File

@@ -21,11 +21,11 @@ if (container) {
ReactDOM.render(( ReactDOM.render((
<Router history={history}> <Router history={history}>
<Route path="/" component={App}> <Route path="/" component={App}>
<IndexRedirect to="systemStatus" /> <IndexRedirect to="knowledgeBase" />
{/* Pages */} {/* Pages */}
<Route path="knowledgeBase(/)**" params={{ tab: 'knowledgeBase' }} component={KnowledgeBase} />
<Route path="systemStatus(/)**" params={{ tab: 'systemStatus' }} component={SystemStatus} /> <Route path="systemStatus(/)**" params={{ tab: 'systemStatus' }} component={SystemStatus} />
<Route path="systemInfo(/)**" params={{ tab: 'systemInfo' }} component={SystemInfo} /> <Route path="systemInfo(/)**" params={{ tab: 'systemInfo' }} component={SystemInfo} />
<Route path="knowledgeBase(/)**" params={{ tab: 'knowledgeBase' }} component={KnowledgeBase} />
</Route> </Route>
</Router> </Router>
), container); ), container);

View File

@@ -4,6 +4,11 @@ import classNames from 'classnames';
import MailPoet from 'mailpoet'; import MailPoet from 'mailpoet';
const tabs = [ const tabs = [
{
name: 'knowledgeBase',
label: MailPoet.I18n.t('tabKnowledgeBaseTitle'),
link: '/knowledgeBase',
},
{ {
name: 'systemStatus', name: 'systemStatus',
label: MailPoet.I18n.t('tabSystemStatusTitle'), label: MailPoet.I18n.t('tabSystemStatusTitle'),
@@ -14,11 +19,6 @@ const tabs = [
label: MailPoet.I18n.t('tabSystemInfoTitle'), label: MailPoet.I18n.t('tabSystemInfoTitle'),
link: '/systemInfo', link: '/systemInfo',
}, },
{
name: 'knowledgeBase',
label: MailPoet.I18n.t('tabKnowledgeBaseTitle'),
link: '/knowledgeBase',
},
]; ];
function Tabs(props) { function Tabs(props) {
@@ -45,6 +45,6 @@ function Tabs(props) {
} }
Tabs.propTypes = { tab: React.PropTypes.string }; Tabs.propTypes = { tab: React.PropTypes.string };
Tabs.defaultProps = { tab: 'systemStatus' }; Tabs.defaultProps = { tab: 'knowledgeBase' };
module.exports = Tabs; module.exports = Tabs;