mirror of
https://github.com/supabase/supabase.git
synced 2026-10-19 08:09:11 +03:00
Improve enabled check on ongoing queries (#26984)
This commit is contained in:
1 parent
db12735c06
commit
06ddfae6ca
1 file changed
+5
-1
@@ -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 ?? []
|
||||
|
||||
|
||||
Reference in new issue
Block a user