ServiceAccounts: Wrap ServiceAccountPage route in dynamic import (#57669)

This commit is contained in:
kay delaney 2022-10-26 15:54:28 +01:00 committed by GitHub
parent b346ae0310
commit 05872283b5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 3 deletions

View File

@ -223,4 +223,4 @@ export const ServiceAccountPageUnconnected = ({
);
};
export const ServiceAccountPage = connector(ServiceAccountPageUnconnected);
export default connector(ServiceAccountPageUnconnected);

View File

@ -14,7 +14,6 @@ import { DATASOURCES_ROUTES } from 'app/features/datasources/constants';
import { getLiveRoutes } from 'app/features/live/pages/routes';
import { getRoutes as getPluginCatalogRoutes } from 'app/features/plugins/admin/routes';
import { getProfileRoutes } from 'app/features/profile/routes';
import { ServiceAccountPage } from 'app/features/serviceaccounts/ServiceAccountPage';
import { AccessControlAction, DashboardRoutes } from 'app/types';
import { SafeDynamicImport } from '../core/components/DynamicImports/SafeDynamicImport';
@ -269,7 +268,9 @@ export function getAppRoutes(): RouteDescriptor[] {
},
{
path: '/org/serviceaccounts/:id',
component: ServiceAccountPage,
component: SafeDynamicImport(
() => import(/* webpackChunkName: "ServiceAccountPage" */ 'app/features/serviceaccounts/ServiceAccountPage')
),
},
{
path: '/org/teams',