Skip to content

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

Merge remote-tracking branch 'upstream/master' into fix/type-cleanup

Nick Rayburna0c13251d1d4
diff --cc studio/components/interfaces/Organization/BillingSettings/ProjectsSummary.tsx
index 3e9c8b105e0,5aa6038eb03..a1231a5862a
--- a/studio/components/interfaces/Organization/BillingSettings/ProjectsSummary.tsx
+++ b/studio/components/interfaces/Organization/BillingSettings/ProjectsSummary.tsx
@@@ -5,10 -4,8 +4,8 @@@ import { FC, useEffect } from 'react
import { IconChevronRight, IconLoader } from '@supabase/ui'
import { useProjectSubscription, useStore } from 'hooks'
-import Panel from 'components/to-be-cleaned/Panel'
+import Panel from 'components/ui/Panel'
- dayjs.extend(utc)
-
interface ProjectSummaryProps {
project: any
}
diff --cc studio/pages/project/[ref]/settings/api.tsx
index 2873d1119cf,7232d745585..e12f9a5808c
--- a/studio/pages/project/[ref]/settings/api.tsx
+++ b/studio/pages/project/[ref]/settings/api.tsx
@@@ -36,9 -36,9 +36,9 @@@ import
import { API_URL } from 'lib/constants'
import { uuidv4 } from 'lib/helpers'
import { patch, get } from 'lib/common/fetch'
- import { useStore, useJwtSecretUpdateStatus, withAuth } from 'hooks'
+ import { useStore, useJwtSecretUpdateStatus } from 'hooks'
-import Panel from 'components/to-be-cleaned/Panel'
+import Panel from 'components/ui/Panel'
import SchemaFormPanel from 'components/to-be-cleaned/forms/SchemaFormPanel'
import { SettingsLayout } from 'components/layouts'
diff --cc studio/pages/project/[ref]/settings/billing/index.tsx
index dbe40bbb4c6,c73e2ce698e..b139241a8aa
--- a/studio/pages/project/[ref]/settings/billing/index.tsx
+++ b/studio/pages/project/[ref]/settings/billing/index.tsx
@@@ -9,13 -9,13 +9,14 @@@ import { SettingsLayout } from 'compone
import LoadingUI from 'components/ui/Loading'
import { PAYGUsage, Subscription, Invoices } from 'components/interfaces/Billing'
-import ProjectUsage from 'components/to-be-cleaned/Usage'
+import ProjectUsage from 'components/ui/Usage'
import DateRangePicker from 'components/to-be-cleaned/DateRangePicker'
import { PaygStats } from 'components/interfaces/Billing/PAYGUsage/PAYGUsage.types'
+import { Project } from '../../../../../types'
+ import { NextPageWithLayout } from 'types'
type ProjectBillingProps = {} & any
- const ProjectBilling: FC<ProjectBillingProps> = ({ store }) => {
+ const ProjectBilling: NextPageWithLayout = ({ store }: ProjectBillingProps) => {
const { ui } = useStore()
const project = ui.selectedProject
@@@ -30,10 -28,14 +29,14 @@@
)
}
- export default withAuth(observer(ProjectBilling))
+ ProjectBilling.getLayout = (page) => (
+ <SettingsLayout title="Billing and Usage">{page}</SettingsLayout>
+ )
+
+ export default observer(ProjectBilling)
type SettingsProps = {
- project: any
+ project?: Project
}
const Settings: FC<SettingsProps> = ({ project }) => {
const { ui } = useStore()
@@@ -106,10 -108,10 +109,10 @@@
</div>
)}
</div>
- {paygStats && <PAYGUsage paygStats={paygStats} />}
+ {paygStats && <PAYGUsage paygStats={paygStats} dateRange={dateRange} />}
</div>
) : (
- <ProjectUsage projectRef={project.ref} subscription_id={project.subscription_id} />
+ <ProjectUsage projectRef={project?.ref} subscription_id={project?.subscription_id} />
)}
<div className="space-y-2">
<h4 className="text-lg">Invoices</h4>
diff --cc studio/pages/project/[ref]/settings/database.tsx
index 808f9aaa6b1,0e9a380788d..dd771621af3
--- a/studio/pages/project/[ref]/settings/database.tsx
+++ b/studio/pages/project/[ref]/settings/database.tsx
@@@ -17,16 -14,14 +14,14 @@@ import { API_URL, DEFAULT_MINIMUM_PASSW
import { SettingsLayout } from 'components/layouts'
import PasswordStrengthBar from 'components/ui/PasswordStrengthBar'
-import Panel from 'components/to-be-cleaned/Panel'
-import { ProjectUsageMinimal } from 'components/to-be-cleaned/Usage'
+import Panel from 'components/ui/Panel'
+import { ProjectUsageMinimal } from 'components/ui/Usage'
import DateRangePicker from 'components/to-be-cleaned/DateRangePicker'
import ChartHandler from 'components/to-be-cleaned/Charts/ChartHandler'
+ import ConnectionPooling from 'components/interfaces/Database/Pooling/ConnectionPooling'
+ import { NextPageWithLayout } from 'types'
- dayjs.extend(customParseFormat)
- dayjs.extend(timezone)
- dayjs.extend(utc)
-
- const ProjectSettings = () => {
+ const ProjectSettings: NextPageWithLayout = () => {
const router = useRouter()
const { ref } = router.query
@@@ -326,14 -343,14 +343,14 @@@ const uriConnString
return (
<>
<div className="">
- <section className="space-y-6 mt-6">
+ <section className="mt-6 space-y-6">
<Panel
- title={[
+ title={
<Typography.Title key="panel-title" level={5} className="mb-0">
Connection info
- </Typography.Title>,
+ </Typography.Title>
// <Title level={4}>Connection info</Title>
- ]}
+ }
>
<Panel.Content className="space-y-6">
<Input
diff --cc studio/pages/project/[ref]/settings/general.tsx
index 026dc1ca191,0cb7c622500..7b91c74a96c
--- a/studio/pages/project/[ref]/settings/general.tsx
+++ b/studio/pages/project/[ref]/settings/general.tsx
@@@ -9,9 -9,9 +9,9 @@@ import { Alert, Button, Input, IconRefr
import { API_URL } from 'lib/constants'
import { pluckJsonSchemaFields, pluckObjectFields } from 'lib/helpers'
import { post, delete_ } from 'lib/common/fetch'
- import { useStore, withAuth } from 'hooks'
+ import { useStore } from 'hooks'
import { SettingsLayout } from 'components/layouts'
-import Panel from 'components/to-be-cleaned/Panel'
+import Panel from 'components/ui/Panel'
import ConfirmModal from 'components/ui/Dialogs/ConfirmDialog'
import SchemaFormPanel from 'components/to-be-cleaned/forms/SchemaFormPanel'
import TextConfirmModal from 'components/ui/Modals/TextConfirmModal'