@@ -4,17 +4,15 @@ import {LinkButton} from '@sentry/scraps/button';
44import { Flex , Stack } from '@sentry/scraps/layout' ;
55import { Heading , Text } from '@sentry/scraps/text' ;
66
7- import { bulkAutofixAutomationSettingsInfiniteOptions } from 'sentry/components/events/autofix/preferences/hooks/useBulkAutofixAutomationSettings' ;
87import { IconSeer } from 'sentry/icons' ;
98import { t } from 'sentry/locale' ;
109import type { Integration } from 'sentry/types/integrations' ;
1110import type { Organization } from 'sentry/types/organization' ;
1211import { trackAnalytics } from 'sentry/utils/analytics' ;
13- import { useFetchAllPages } from 'sentry/utils/api/apiFetch' ;
1412import { getApiUrl } from 'sentry/utils/api/getApiUrl' ;
1513import { getSeerOnboardingCheckQueryOptions } from 'sentry/utils/getSeerOnboardingCheckQueryOptions' ;
1614import { isActiveSuperuser } from 'sentry/utils/isActiveSuperuser' ;
17- import { useApiQuery , useInfiniteQuery , useQuery } from 'sentry/utils/queryClient' ;
15+ import { useApiQuery , useQuery } from 'sentry/utils/queryClient' ;
1816import { useOrganization } from 'sentry/utils/useOrganization' ;
1917import {
2018 PrimaryNavigation ,
@@ -130,29 +128,16 @@ function useReminderCopywriting() {
130128
131129 const hasSeatBasedSeer = organization . features . includes ( 'seat-based-seer-enabled' ) ;
132130
133- const autofixResult = useInfiniteQuery ( {
134- ...bulkAutofixAutomationSettingsInfiniteOptions ( {
135- organization,
136- } ) ,
137- enabled : hasSeatBasedSeer ,
138- staleTime : 60_000 ,
139- select : ( { pages} ) => pages . flatMap ( page => page . json ) ,
140- } ) ;
141- useFetchAllPages ( { result : autofixResult } ) ;
142-
143- const { data : autofixSettings , isPending : isAutofixPending } = autofixResult ;
144-
145131 const {
146- isPending : isOnboardingPending ,
147- isError : isOnboardingError ,
148- data : onboardingData ,
132+ isPending,
133+ isError,
134+ data : data ,
149135 } = useQuery ( getSeerOnboardingCheckQueryOptions ( { organization, staleTime : 60_000 } ) ) ;
150136
151- if ( ! hasSeatBasedSeer || isOnboardingPending || isOnboardingError || isAutofixPending ) {
137+ if ( ! hasSeatBasedSeer || isPending || isError ) {
152138 return null ;
153139 }
154- const { hasSupportedScmIntegration, isCodeReviewEnabled} = onboardingData ;
155- const hasAutofix = autofixSettings ?. some ( s => s . reposCount > 0 ) ;
140+ const { hasSupportedScmIntegration, isAutofixEnabled, isCodeReviewEnabled} = data ;
156141
157142 if ( ! hasSupportedScmIntegration ) {
158143 return {
@@ -163,7 +148,7 @@ function useReminderCopywriting() {
163148 } ;
164149 }
165150
166- if ( ! hasAutofix ) {
151+ if ( ! isAutofixEnabled ) {
167152 return {
168153 title : (
169154 < Flex align = "center" gap = "sm" >
0 commit comments