Add routing

This commit is contained in:
Vladislav Makhov 2020-08-04 09:53:13 +03:00
parent a1f53b16c4
commit 153a420674
2 changed files with 21 additions and 2 deletions

View File

@ -1,4 +1,4 @@
import React, { lazy,Suspense } from "react";
import React, { lazy, Suspense } from "react";
import { Route, Switch, Redirect } from "react-router-dom";
import { withRouter } from "react-router";
import Layout from './Layout';
@ -6,10 +6,11 @@ import { Loader } from "asc-web-components";
const CommonSettings = lazy(() => import("./categories/common"));
const SecuritySettings = lazy(() => import("./categories/security"));
const IntegrationSettings = lazy(() => import("./categories/integration"));
const Settings = () => {
const basePath = '/settings';
return (
<Layout key='1'>
<Suspense fallback={<Loader className="pageLoader" type="rombs" size='40px' />}>
@ -18,6 +19,10 @@ const Settings = () => {
path={`${basePath}/security`}
component={SecuritySettings}
/>
<Route
path={`${basePath}/integration`}
component={IntegrationSettings}
/>
<Route
path={[`${basePath}/common`, basePath]}
component={CommonSettings}

View File

@ -36,6 +36,20 @@ export const settingsTree = [
},
]
},
{
key: '3',
icon: 'SettingsIcon',
link: 'integration',
tKey: 'ManagementCategoryIntegration',
children: [
{
key: '3-0',
icon: '',
link: 'third-party-services',
tKey: 'ThirdPartyAuthorization',
},
]
},
];