-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathroutes.tsx
More file actions
38 lines (35 loc) · 950 Bytes
/
routes.tsx
File metadata and controls
38 lines (35 loc) · 950 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
import { ErrorBoundary } from '@/components/ErrorBoundary';
import { Config } from '@/config/config';
import { dataRoutes } from '@/config/routes';
import { notImplementedRoutes } from '@/notImplementedRoutes';
import { applyReactRouterPlugins } from '@/reactRouterPlugins';
import { Outlet } from 'react-router-dom';
import { HpRootLayout } from './hpRootLayout';
export const hostedPortalRoutes = [
...notImplementedRoutes,
// Must be last as alias handling will require match on whildcard
...dataRoutes,
];
export function createHostedPortalRoutes(config: Config) {
return applyReactRouterPlugins(
[
{
element: (
<HpRootLayout
children={
<ErrorBoundary>
<Outlet />
</ErrorBoundary>
}
/>
),
children: [
{
children: hostedPortalRoutes,
},
],
},
],
config
);
}