Skip to content

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

Improve enabled check on ongoing queries (#26984)

Joshen Lime904030bd12e
diff --git a/apps/studio/components/interfaces/SQLEditor/OngoingQueriesPanel.tsx b/apps/studio/components/interfaces/SQLEditor/OngoingQueriesPanel.tsx
index 4f4db881c9c..34eba6240e1 100644
--- a/apps/studio/components/interfaces/SQLEditor/OngoingQueriesPanel.tsx
+++ b/apps/studio/components/interfaces/SQLEditor/OngoingQueriesPanel.tsx
@@ -25,6 +25,7 @@ import {
import ConfirmationModal from 'ui-patterns/Dialogs/ConfirmationModal'
import AlertError from 'components/ui/AlertError'
import { ResponseError } from 'types'
+import { IS_PLATFORM } from 'lib/constants'
interface OngoingQueriesPanel {
visible: boolean
@@ -51,7 +52,10 @@ export const OngoingQueriesPanel = ({ visible, onClose }: OngoingQueriesPanel) =
projectRef: project?.ref,
connectionString: database?.connectionString,
},
- { staleTime: 5000 }
+ {
+ enabled: !IS_PLATFORM || (IS_PLATFORM && database?.connectionString !== undefined),
+ staleTime: 5000,
+ }
)
const queries = data ?? []