@cccsaurora/howler-ui 2.18.0-dev.752 → 2.18.0-dev.758
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/components/app/App.js +3 -10
- package/package.json +1 -1
package/components/app/App.js
CHANGED
|
@@ -63,7 +63,7 @@ import utc from 'dayjs/plugin/utc';
|
|
|
63
63
|
import i18n from '@cccsaurora/howler-ui/i18n';
|
|
64
64
|
import * as monaco from 'monaco-editor';
|
|
65
65
|
import howlerPluginStore from '@cccsaurora/howler-ui/plugins/store';
|
|
66
|
-
import { useContext, useEffect } from 'react';
|
|
66
|
+
import { useContext, useEffect, useMemo } from 'react';
|
|
67
67
|
import { I18nextProvider } from 'react-i18next';
|
|
68
68
|
import { PluginProvider, usePluginStore } from 'react-pluggable';
|
|
69
69
|
import { createBrowserRouter, Outlet, RouterProvider, useLocation, useNavigate } from 'react-router-dom';
|
|
@@ -159,7 +159,7 @@ const MyAppProvider = ({ children }) => {
|
|
|
159
159
|
const AppProviderWrapper = () => {
|
|
160
160
|
return (_jsx(I18nextProvider, { i18n: i18n, defaultNS: "translation", children: _jsx(ApiConfigProvider, { children: _jsx(PluginProvider, { pluginStore: howlerPluginStore.pluginStore, children: _jsx(AppBarProvider, { children: _jsxs(MyAppProvider, { children: [_jsx(MyApp, {}), _jsx(Modal, {})] }) }) }) }) }));
|
|
161
161
|
};
|
|
162
|
-
const
|
|
162
|
+
const createRouter = () => createBrowserRouter([
|
|
163
163
|
{
|
|
164
164
|
path: '/',
|
|
165
165
|
element: _jsx(AppProviderWrapper, {}),
|
|
@@ -188,10 +188,6 @@ const router = createBrowserRouter([
|
|
|
188
188
|
path: 'hits/:id',
|
|
189
189
|
element: _jsx(HitViewer, {})
|
|
190
190
|
},
|
|
191
|
-
{
|
|
192
|
-
path: 'bundles/:id',
|
|
193
|
-
element: _jsx(RecordBrowser, {})
|
|
194
|
-
},
|
|
195
191
|
{
|
|
196
192
|
path: 'cases',
|
|
197
193
|
element: _jsx(Cases, {})
|
|
@@ -334,10 +330,6 @@ const router = createBrowserRouter([
|
|
|
334
330
|
path: 'advanced',
|
|
335
331
|
element: _jsx(QueryBuilder, {})
|
|
336
332
|
},
|
|
337
|
-
{
|
|
338
|
-
path: 'settings',
|
|
339
|
-
element: _jsx(Settings, {})
|
|
340
|
-
},
|
|
341
333
|
{
|
|
342
334
|
path: 'action',
|
|
343
335
|
element: _jsx(RoleRoute, { role: "automation_basic" }),
|
|
@@ -378,6 +370,7 @@ const router = createBrowserRouter([
|
|
|
378
370
|
}
|
|
379
371
|
]);
|
|
380
372
|
const App = () => {
|
|
373
|
+
const router = useMemo(() => createRouter(), []);
|
|
381
374
|
return _jsx(RouterProvider, { router: router });
|
|
382
375
|
};
|
|
383
376
|
export default App;
|