From cd8556026eb17341b5c06ca40dcf9266ae69aa91 Mon Sep 17 00:00:00 2001 From: Tom Ratcliffe Date: Wed, 23 Apr 2025 12:38:10 +0100 Subject: [PATCH] Chore: Fix re-exported `skipToken` from dashboards API (#104387) --- .betterer.results | 3 --- .../core/components/NestedFolderPicker/NestedFolderPicker.tsx | 3 ++- public/app/features/browse-dashboards/BrowseDashboardsPage.tsx | 3 ++- .../app/features/browse-dashboards/api/browseDashboardsAPI.ts | 2 -- 4 files changed, 4 insertions(+), 7 deletions(-) diff --git a/.betterer.results b/.betterer.results index f84c6215f19..2518e0548be 100644 --- a/.betterer.results +++ b/.betterer.results @@ -1082,9 +1082,6 @@ exports[`better eslint`] = { "public/app/features/auth-config/utils/data.ts:5381": [ [0, 0, 0, "Do not use any type assertions.", "0"] ], - "public/app/features/browse-dashboards/api/browseDashboardsAPI.ts:5381": [ - [0, 0, 0, "Do not re-export imported variable (\`@reduxjs/toolkit/query/react\`)", "0"] - ], "public/app/features/browse-dashboards/state/index.ts:5381": [ [0, 0, 0, "Do not use export all (\`export * from ...\`)", "0"], [0, 0, 0, "Do not use export all (\`export * from ...\`)", "1"], diff --git a/public/app/core/components/NestedFolderPicker/NestedFolderPicker.tsx b/public/app/core/components/NestedFolderPicker/NestedFolderPicker.tsx index 83eedefef29..db450642286 100644 --- a/public/app/core/components/NestedFolderPicker/NestedFolderPicker.tsx +++ b/public/app/core/components/NestedFolderPicker/NestedFolderPicker.tsx @@ -1,5 +1,6 @@ import { css } from '@emotion/css'; import { autoUpdate, flip, useClick, useDismiss, useFloating, useInteractions } from '@floating-ui/react'; +import { skipToken } from '@reduxjs/toolkit/query'; import debounce from 'debounce-promise'; import { useCallback, useEffect, useId, useMemo, useRef, useState } from 'react'; import * as React from 'react'; @@ -8,7 +9,7 @@ import { GrafanaTheme2 } from '@grafana/data'; import { config } from '@grafana/runtime'; import { Alert, Icon, Input, LoadingBar, Stack, Text, useStyles2 } from '@grafana/ui'; import { t } from 'app/core/internationalization'; -import { skipToken, useGetFolderQuery } from 'app/features/browse-dashboards/api/browseDashboardsAPI'; +import { useGetFolderQuery } from 'app/features/browse-dashboards/api/browseDashboardsAPI'; import { DashboardViewItemWithUIItems, DashboardsTreeItem } from 'app/features/browse-dashboards/types'; import { getGrafanaSearcher } from 'app/features/search/service/searcher'; import { QueryResponse } from 'app/features/search/service/types'; diff --git a/public/app/features/browse-dashboards/BrowseDashboardsPage.tsx b/public/app/features/browse-dashboards/BrowseDashboardsPage.tsx index 287c972a70f..a41cc80d206 100644 --- a/public/app/features/browse-dashboards/BrowseDashboardsPage.tsx +++ b/public/app/features/browse-dashboards/BrowseDashboardsPage.tsx @@ -1,4 +1,5 @@ import { css } from '@emotion/css'; +import { skipToken } from '@reduxjs/toolkit/query'; import { memo, useEffect, useMemo } from 'react'; import { useLocation, useParams } from 'react-router-dom-v5-compat'; import AutoSizer from 'react-virtualized-auto-sizer'; @@ -18,7 +19,7 @@ import { buildNavModel, getDashboardsTabID } from '../folders/state/navModel'; import { useSearchStateManager } from '../search/state/SearchStateManager'; import { getSearchPlaceholder } from '../search/tempI18nPhrases'; -import { skipToken, useGetFolderQuery, useSaveFolderMutation } from './api/browseDashboardsAPI'; +import { useGetFolderQuery, useSaveFolderMutation } from './api/browseDashboardsAPI'; import { BrowseActions } from './components/BrowseActions/BrowseActions'; import { BrowseFilters } from './components/BrowseFilters'; import { BrowseView } from './components/BrowseView'; diff --git a/public/app/features/browse-dashboards/api/browseDashboardsAPI.ts b/public/app/features/browse-dashboards/api/browseDashboardsAPI.ts index accd12757bf..89749f285d5 100644 --- a/public/app/features/browse-dashboards/api/browseDashboardsAPI.ts +++ b/public/app/features/browse-dashboards/api/browseDashboardsAPI.ts @@ -443,5 +443,3 @@ export const { useRestoreDashboardMutation, useHardDeleteDashboardMutation, } = browseDashboardsAPI; - -export { skipToken } from '@reduxjs/toolkit/query/react';