diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 25a90571499..7e542550208 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -472,6 +472,7 @@ playwright.config.ts @grafana/plugins-platform-frontend /public/app/features/users/ @grafana/access-squad /public/app/features/variables/ @grafana/dashboards-squad /public/app/features/preferences/ @grafana/grafana-frontend-platform +/public/app/features/bookmarks/ @grafana/grafana-frontend-platform /public/app/plugins/panel/alertlist/ @grafana/alerting-frontend /public/app/plugins/panel/annolist/ @grafana/grafana-frontend-platform /public/app/plugins/panel/barchart/ @grafana/dataviz-squad diff --git a/public/app/core/components/Bookmarks/BookmarksPage.tsx b/public/app/features/bookmarks/BookmarksPage.tsx similarity index 87% rename from public/app/core/components/Bookmarks/BookmarksPage.tsx rename to public/app/features/bookmarks/BookmarksPage.tsx index d7e48ac68bb..810baa17ed9 100644 --- a/public/app/core/components/Bookmarks/BookmarksPage.tsx +++ b/public/app/features/bookmarks/BookmarksPage.tsx @@ -2,14 +2,13 @@ import { css } from '@emotion/css'; import { GrafanaTheme2, NavModelItem } from '@grafana/data'; import { EmptyState, useStyles2 } from '@grafana/ui'; +import { usePinnedItems } from 'app/core/components/AppChrome/MegaMenu/hooks'; +import { findByUrl } from 'app/core/components/AppChrome/MegaMenu/utils'; +import { NavLandingPageCard } from 'app/core/components/NavLandingPage/NavLandingPageCard'; import { Page } from 'app/core/components/Page/Page'; import { t, Trans } from 'app/core/internationalization'; import { useSelector } from 'app/types'; -import { usePinnedItems } from '../AppChrome/MegaMenu/hooks'; -import { findByUrl } from '../AppChrome/MegaMenu/utils'; -import { NavLandingPageCard } from '../NavLandingPage/NavLandingPageCard'; - export function BookmarksPage() { const styles = useStyles2(getStyles); const pinnedItems = usePinnedItems(); @@ -63,3 +62,5 @@ const getStyles = (theme: GrafanaTheme2) => ({ padding: theme.spacing(2, 0), }), }); + +export default BookmarksPage; diff --git a/public/app/routes/routes.tsx b/public/app/routes/routes.tsx index a3a88ca83b8..3543f334cdf 100644 --- a/public/app/routes/routes.tsx +++ b/public/app/routes/routes.tsx @@ -19,7 +19,6 @@ import { getAppPluginRoutes } from 'app/features/plugins/routes'; import { getProfileRoutes } from 'app/features/profile/routes'; import { AccessControlAction, DashboardRoutes } from 'app/types'; -import { BookmarksPage } from '../core/components/Bookmarks/BookmarksPage'; import { SafeDynamicImport } from '../core/components/DynamicImports/SafeDynamicImport'; import { RouteDescriptor } from '../core/navigation/types'; import { getPublicDashboardRoutes } from '../features/dashboard/routes'; @@ -530,7 +529,9 @@ export function getAppRoutes(): RouteDescriptor[] { }, { path: '/bookmarks', - component: () => , + component: SafeDynamicImport( + () => import(/* webpackChunkName: "BookmarksPage"*/ 'app/features/bookmarks/BookmarksPage') + ), }, ...getPluginCatalogRoutes(), ...getSupportBundleRoutes(),