Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

fix: skip incident status query for CLI and self-hosted (#41972)

Andrey A.21e9d07dea02
diff --git a/apps/studio/data/platform/incident-status-query.ts b/apps/studio/data/platform/incident-status-query.ts
index 87452bbbbb0..6efb96c1a09 100644
--- a/apps/studio/data/platform/incident-status-query.ts
+++ b/apps/studio/data/platform/incident-status-query.ts
@@ -1,7 +1,7 @@
import { useQuery } from '@tanstack/react-query'
import type { IncidentInfo } from 'lib/api/incident-status'
-import { BASE_PATH } from 'lib/constants'
+import { BASE_PATH, IS_PLATFORM } from 'lib/constants'
import { UseCustomQueryOptions } from 'types'
import { platformKeys } from './keys'
@@ -35,4 +35,5 @@ export const useIncidentStatusQuery = <TData = IncidentStatusData>(
queryFn: ({ signal }) => getIncidentStatus(signal),
staleTime: 1000 * 60 * 5, // 5 minutes to match API cache
...options,
+ enabled: IS_PLATFORM && (options.enabled ?? true),
})