Skip to content

Commit d100be4

Browse files
alaisterjoshenlim
andauthored
chore: remove tableEditorPrefetching feature flag (supabase#30315)
Co-authored-by: Joshen Lim <[email protected]>
1 parent 9046a7a commit d100be4

File tree

2 files changed

+2
-8
lines changed

2 files changed

+2
-8
lines changed

apps/studio/data/prefetchers/project.$ref.editor.$id.tsx

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ import { Filter, Sort } from 'components/grid/types'
1212
import { useProjectContext } from 'components/layouts/ProjectLayout/ProjectContext'
1313
import { prefetchTableEditor } from 'data/table-editor/table-editor-query'
1414
import { prefetchTableRows } from 'data/table-rows/table-rows-query'
15-
import { useFlag } from 'hooks/ui/useFlag'
1615
import { ImpersonationRole } from 'lib/role-impersonation'
1716
import { useRoleImpersonationStateSnapshot } from 'state/role-impersonation-state'
1817
import { TABLE_EDITOR_DEFAULT_ROWS_PER_PAGE } from 'state/table-editor'
@@ -67,12 +66,9 @@ export function usePrefetchEditorTablePage() {
6766
const queryClient = useQueryClient()
6867
const { project } = useProjectContext()
6968
const roleImpersonationState = useRoleImpersonationStateSnapshot()
70-
const tableEditorPrefetchingEnabled = useFlag('tableEditorPrefetching')
7169

7270
return useCallback(
7371
({ id: _id, filters, sorts }: { id?: string; filters?: Filter[]; sorts?: Sort[] }) => {
74-
if (!tableEditorPrefetchingEnabled) return
75-
7672
const id = _id ? Number(_id) : undefined
7773
if (!project || !id || isNaN(id)) return
7874

@@ -92,7 +88,7 @@ export function usePrefetchEditorTablePage() {
9288
// eat prefetching errors as they are not critical
9389
})
9490
},
95-
[project, queryClient, roleImpersonationState.role, router, tableEditorPrefetchingEnabled]
91+
[project, queryClient, roleImpersonationState.role, router]
9692
)
9793
}
9894

apps/studio/data/prefetchers/project.$ref.editor.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,22 +7,20 @@ import { prefetchSchemas } from 'data/database/schemas-query'
77
import { ENTITY_TYPE } from 'data/entity-types/entity-type-constants'
88
import { prefetchEntityTypes } from 'data/entity-types/entity-types-infinite-query'
99
import { useLocalStorage } from 'hooks/misc/useLocalStorage'
10-
import { useFlag } from 'hooks/ui/useFlag'
1110
import PrefetchableLink, { PrefetchableLinkProps } from './PrefetchableLink'
1211

1312
export function usePrefetchEditorIndexPage() {
1413
const router = useRouter()
1514
const queryClient = useQueryClient()
1615
const { project } = useProjectContext()
17-
const tableEditorPrefetchingEnabled = useFlag('tableEditorPrefetching')
1816

1917
const [entityTypesSort] = useLocalStorage<'alphabetical' | 'grouped-alphabetical'>(
2018
'table-editor-sort',
2119
'alphabetical'
2220
)
2321

2422
return useCallback(() => {
25-
if (!tableEditorPrefetchingEnabled || !project) return
23+
if (!project) return
2624

2725
// Prefetch code
2826
router.prefetch(`/project/${project.ref}/editor`)

0 commit comments

Comments
 (0)