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