The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
moves useTableRowsPrefetchWrapper
Alaister Young3270b643f1a5
diff --git a/studio/components/layouts/TableEditorLayout/TableEditorLayout.tsx b/studio/components/layouts/TableEditorLayout/TableEditorLayout.tsxindex 0ba39aab31a..bd25b07380e 100644--- a/studio/components/layouts/TableEditorLayout/TableEditorLayout.tsx+++ b/studio/components/layouts/TableEditorLayout/TableEditorLayout.tsx@@ -12,8 +12,8 @@ import TableEditorMenu from './TableEditorMenu'import NoPermission from 'components/ui/NoPermission'import useEntityType from 'hooks/misc/useEntityType'import Connecting from 'components/ui/Loading/Loading'-import useTableRowsPrefetch from 'hooks/misc/useTableRowsPrefetch'import useLatest from 'hooks/misc/useLatest'+import useTableRowsPrefetchWrapper from './TableEditorLayout.utils'export interface TableEditorLayoutProps {selectedSchema?: string@@ -64,7 +64,7 @@ const TableEditorLayout = ({})})- const prefetch = useLatest(useTableRowsPrefetch())+ const prefetch = useLatest(useTableRowsPrefetchWrapper())useEffect(() => {let mounted = truediff --git a/studio/hooks/misc/useTableRowsPrefetch.ts b/studio/components/layouts/TableEditorLayout/TableEditorLayout.utils.tssimilarity index 83%rename from studio/hooks/misc/useTableRowsPrefetch.tsrename to studio/components/layouts/TableEditorLayout/TableEditorLayout.utils.tsindex 74dcae5e95e..2d4340bb3c0 100644--- a/studio/hooks/misc/useTableRowsPrefetch.ts+++ b/studio/components/layouts/TableEditorLayout/TableEditorLayout.utils.ts@@ -6,9 +6,9 @@ import { useUrlState } from 'hooks'import { useCallback } from 'react'/**- * useTableRowsPrefetch is a wrapper around the base useTableRowsPrefetch that prefills the sort and filter params+ * useTableRowsPrefetchWrapper is a wrapper around the base useTableRowsPrefetch that prefills the sort and filter params*/-function useTableRowsPrefetch() {+function useTableRowsPrefetchWrapper() {const [{ sort, filter }] = useUrlState({arrayKeys: ['sort', 'filter'],})@@ -34,4 +34,4 @@ function useTableRowsPrefetch() {)}-export default useTableRowsPrefetch+export default useTableRowsPrefetchWrapper