@@ -6,15 +6,20 @@ import type {ComboBoxState} from '@react-stately/combobox';
6
6
import { promptsUpdate } from 'sentry/actionCreators/prompts' ;
7
7
import { FeatureBadge } from 'sentry/components/core/badge/featureBadge' ;
8
8
import InteractionStateLayer from 'sentry/components/core/interactionStateLayer' ;
9
- import { useOrganizationSeerSetup } from 'sentry/components/events/autofix/useOrganizationSeerSetup' ;
9
+ import { makeOrganizationSeerSetupQueryKey } from 'sentry/components/events/autofix/useOrganizationSeerSetup' ;
10
10
import ExternalLink from 'sentry/components/links/externalLink' ;
11
11
import LoadingIndicator from 'sentry/components/loadingIndicator' ;
12
12
import { useSearchQueryBuilder } from 'sentry/components/searchQueryBuilder/context' ;
13
13
import { IconSeer } from 'sentry/icons' ;
14
14
import { t , tct } from 'sentry/locale' ;
15
15
import { space } from 'sentry/styles/space' ;
16
16
import { trackAnalytics } from 'sentry/utils/analytics' ;
17
- import { useIsMutating , useMutation , useQueryClient } from 'sentry/utils/queryClient' ;
17
+ import {
18
+ useIsFetching ,
19
+ useIsMutating ,
20
+ useMutation ,
21
+ useQueryClient ,
22
+ } from 'sentry/utils/queryClient' ;
18
23
import useApi from 'sentry/utils/useApi' ;
19
24
import useOrganization from 'sentry/utils/useOrganization' ;
20
25
@@ -149,7 +154,10 @@ export function AskSeer<T>({state}: {state: ComboBoxState<T>}) {
149
154
mutationKey : [ setupCheckQueryKey ( organization . slug ) ] ,
150
155
} ) ;
151
156
152
- const { isPending : isPendingSetupCheck } = useOrganizationSeerSetup ( ) ;
157
+ const isPendingSetupCheck =
158
+ useIsFetching ( {
159
+ queryKey : [ makeOrganizationSeerSetupQueryKey ( organization . slug ) ] ,
160
+ } ) > 0 ;
153
161
154
162
if ( isPendingSetupCheck || isMutating ) {
155
163
return (
0 commit comments