Skip to content

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

chore: clean up initWithKps flag

dragarcia437e81c2f3fc
diff --git a/studio/components/layouts/ProjectLayout/ProjectPausedState.tsx b/studio/components/layouts/ProjectLayout/ProjectPausedState.tsx
index e573360e929..77527ba7c50 100644
--- a/studio/components/layouts/ProjectLayout/ProjectPausedState.tsx
+++ b/studio/components/layouts/ProjectLayout/ProjectPausedState.tsx
@@ -8,7 +8,7 @@ import { useParams } from 'common'
import ConfirmModal from 'components/ui/Dialogs/ConfirmDialog'
import { useFreeProjectLimitCheckQuery } from 'data/organizations/free-project-limit-check-query'
import { setProjectStatus } from 'data/projects/projects-query'
-import { useCheckPermissions, useFlag, useSelectedOrganization, useStore } from 'hooks'
+import { useCheckPermissions, useSelectedOrganization, useStore } from 'hooks'
import { post } from 'lib/common/fetch'
import { API_URL, PROJECT_STATUS } from 'lib/constants'
import { Button, IconPauseCircle, Modal } from 'ui'
@@ -26,7 +26,6 @@ const ProjectPausedState = ({ product }: ProjectPausedStateProps) => {
const { project } = useProjectContext()
const orgSlug = selectedOrganization?.slug
- const kpsEnabled = useFlag('initWithKps')
const { data: membersExceededLimit } = useFreeProjectLimitCheckQuery({ slug: orgSlug })
const hasMembersExceedingFreeTierLimit = (membersExceededLimit || []).length > 0
@@ -57,9 +56,7 @@ const ProjectPausedState = ({ product }: ProjectPausedStateProps) => {
})
}
- const { error } = await post(`${API_URL}/projects/${project.ref}/restore`, {
- kps_enabled: kpsEnabled,
- })
+ const { error } = await post(`${API_URL}/projects/${project.ref}/restore`, {})
if (error) {
ui.setNotification({
diff --git a/studio/pages/new/[slug].tsx b/studio/pages/new/[slug].tsx
index d2a210abf88..a73d3a53d2a 100644
--- a/studio/pages/new/[slug].tsx
+++ b/studio/pages/new/[slug].tsx
@@ -58,7 +58,6 @@ const Wizard: NextPageWithLayout = () => {
const projectCreationDisabled = useFlag('disableProjectCreationAndUpdate')
const cloudProviderEnabled = useFlag('enableFlyCloudProvider')
- const kpsEnabled = useFlag('initWithKps')
const { data: membersExceededLimit, isLoading: isLoadingFreeProjectLimitCheck } =
useFreeProjectLimitCheckQuery({ slug })
@@ -213,7 +212,6 @@ const Wizard: NextPageWithLayout = () => {
db_pass: dbPass,
db_region: dbRegion,
db_pricing_tier_id: (PRICING_TIER_PRODUCT_IDS as any)[dbTier],
- kps_enabled: kpsEnabled,
}
if (postgresVersion) {
if (!postgresVersion.match(/1[2-9]\..*/)) {
diff --git a/studio/pages/project/[ref]/reports/index.tsx b/studio/pages/project/[ref]/reports/index.tsx
index 7449cac1495..c03b01da996 100644
--- a/studio/pages/project/[ref]/reports/index.tsx
+++ b/studio/pages/project/[ref]/reports/index.tsx
@@ -8,7 +8,7 @@ import { useProjectContext } from 'components/layouts/ProjectLayout/ProjectConte
import ProductEmptyState from 'components/to-be-cleaned/ProductEmptyState'
import { createReport } from 'components/to-be-cleaned/Reports/Reports.utils'
import Loading from 'components/ui/Loading'
-import { useCheckPermissions, useFlag, useStore } from 'hooks'
+import { useCheckPermissions, useStore } from 'hooks'
import { post } from 'lib/common/fetch'
import { API_URL, PROJECT_STATUS } from 'lib/constants'
import { useProfile } from 'lib/profile'
@@ -31,11 +31,9 @@ export const UserReportPage: NextPageWithLayout = () => {
subject: { id: profile?.id },
})
- const kpsEnabled = useFlag('initWithKps')
-
useEffect(() => {
if (project && project.status === PROJECT_STATUS.INACTIVE) {
- post(`${API_URL}/projects/${ref}/restore`, { kps_enabled: kpsEnabled })
+ post(`${API_URL}/projects/${ref}/restore`, {})
}
}, [project])
diff --git a/studio/pages/project/[ref]/settings/storage.tsx b/studio/pages/project/[ref]/settings/storage.tsx
index 8a5bfe475f5..8086374e287 100644
--- a/studio/pages/project/[ref]/settings/storage.tsx
+++ b/studio/pages/project/[ref]/settings/storage.tsx
@@ -4,7 +4,6 @@ import { useParams } from 'common/hooks'
import { SettingsLayout } from 'components/layouts'
import { useProjectContext } from 'components/layouts/ProjectLayout/ProjectContext'
import { StorageSettings } from 'components/to-be-cleaned/Storage'
-import { useFlag } from 'hooks'
import { post } from 'lib/common/fetch'
import { API_URL, PROJECT_STATUS } from 'lib/constants'
import { NextPageWithLayout } from 'types'
@@ -16,11 +15,9 @@ const PageLayout: NextPageWithLayout = () => {
const { ref: projectRef } = useParams()
const { project } = useProjectContext()
- const kpsEnabled = useFlag('initWithKps')
-
useEffect(() => {
if (project && project.status === PROJECT_STATUS.INACTIVE) {
- post(`${API_URL}/projects/${projectRef}/restore`, { kps_enabled: kpsEnabled })
+ post(`${API_URL}/projects/${projectRef}/restore`, {})
}
}, [project])
diff --git a/studio/pages/project/[ref]/storage/buckets/[bucketId].tsx b/studio/pages/project/[ref]/storage/buckets/[bucketId].tsx
index fbdf24b49a5..1dc44fe2deb 100644
--- a/studio/pages/project/[ref]/storage/buckets/[bucketId].tsx
+++ b/studio/pages/project/[ref]/storage/buckets/[bucketId].tsx
@@ -8,7 +8,6 @@ import { useProjectContext } from 'components/layouts/ProjectLayout/ProjectConte
import StorageBucketsError from 'components/layouts/StorageLayout/StorageBucketsError'
import { StorageExplorer } from 'components/to-be-cleaned/Storage'
import { useBucketsQuery } from 'data/storage/buckets-query'
-import { useFlag } from 'hooks'
import { post } from 'lib/common/fetch'
import { API_URL, PROJECT_STATUS } from 'lib/constants'
import { NextPageWithLayout } from 'types'
@@ -20,11 +19,9 @@ const PageLayout: NextPageWithLayout = () => {
const { data, isSuccess, isError, error } = useBucketsQuery({ projectRef: ref })
const buckets = data ?? []
- const kpsEnabled = useFlag('initWithKps')
-
useEffect(() => {
if (project && project.status === PROJECT_STATUS.INACTIVE) {
- post(`${API_URL}/projects/${ref}/restore`, { kps_enabled: kpsEnabled })
+ post(`${API_URL}/projects/${ref}/restore`, {})
}
}, [ref, project])
diff --git a/studio/pages/project/[ref]/storage/buckets/index.tsx b/studio/pages/project/[ref]/storage/buckets/index.tsx
index 663126a9447..4d5ef33b303 100644
--- a/studio/pages/project/[ref]/storage/buckets/index.tsx
+++ b/studio/pages/project/[ref]/storage/buckets/index.tsx
@@ -6,7 +6,6 @@ import { useProjectContext } from 'components/layouts/ProjectLayout/ProjectConte
import StorageBucketsError from 'components/layouts/StorageLayout/StorageBucketsError'
import ProductEmptyState from 'components/to-be-cleaned/ProductEmptyState'
import { useBucketsQuery } from 'data/storage/buckets-query'
-import { useFlag } from 'hooks'
import { post } from 'lib/common/fetch'
import { API_URL, PROJECT_STATUS } from 'lib/constants'
import { NextPageWithLayout } from 'types'
@@ -17,13 +16,12 @@ import { NextPageWithLayout } from 'types'
const PageLayout: NextPageWithLayout = () => {
const { ref } = useParams()
const { project } = useProjectContext()
- const kpsEnabled = useFlag('initWithKps')
const { error, isError } = useBucketsQuery({ projectRef: ref })
useEffect(() => {
if (project && project.status === PROJECT_STATUS.INACTIVE) {
- post(`${API_URL}/projects/${ref}/restore`, { kps_enabled: kpsEnabled })
+ post(`${API_URL}/projects/${ref}/restore`, {})
}
}, [ref, project])
diff --git a/studio/pages/project/[ref]/storage/policies.tsx b/studio/pages/project/[ref]/storage/policies.tsx
index f1809b04734..5b42fbbb18d 100644
--- a/studio/pages/project/[ref]/storage/policies.tsx
+++ b/studio/pages/project/[ref]/storage/policies.tsx
@@ -5,7 +5,7 @@ import { useParams } from 'common'
import { StorageLayout } from 'components/layouts'
import { useProjectContext } from 'components/layouts/ProjectLayout/ProjectContext'
import { StoragePolicies } from 'components/to-be-cleaned/Storage'
-import { useFlag, useStore } from 'hooks'
+import { useStore } from 'hooks'
import { post } from 'lib/common/fetch'
import { API_URL, PROJECT_STATUS } from 'lib/constants'
import { NextPageWithLayout } from 'types'
@@ -19,11 +19,9 @@ const PageLayout: NextPageWithLayout = () => {
const { meta } = useStore()
const { project } = useProjectContext()
- const kpsEnabled = useFlag('initWithKps')
-
useEffect(() => {
if (project && project.status === PROJECT_STATUS.INACTIVE) {
- post(`${API_URL}/projects/${ref}/restore`, { kps_enabled: kpsEnabled })
+ post(`${API_URL}/projects/${ref}/restore`, {})
}
meta.roles.load()
}, [project])