Skip to content

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

Styling updates

Joshen Lim0d524351c9b8
diff --git a/studio/pages/settings/[[...routesSlug]].tsx b/studio/pages/settings/[[...routesSlug]].tsx
new file mode 100644
index 00000000000..581fa322249
--- /dev/null
+++ b/studio/pages/settings/[[...routesSlug]].tsx
@@ -0,0 +1,69 @@
+import { NextPage } from 'next'
+import { useRouter } from 'next/router'
+import { observer } from 'mobx-react-lite'
+import { Typography } from '@supabase/ui'
+
+import { withAuth } from 'hooks'
+import { AccountLayout } from 'components/layouts'
+import ProjectList from 'components/interfaces/Home/ProjectList'
+
+const urlRewriterFactory = (slug: string | string[] | undefined) => {
+ return (projectRef: string) => {
+ if (!Array.isArray(slug)) {
+ return `/project/${projectRef}/settings/general`
+ }
+
+ if (slug[0] === 'auth') {
+ if (slug[1]) return `/project/${projectRef}/auth/${slug[1]}`
+ return `/project/${projectRef}/auth/settings`
+ }
+
+ let slugPath = ''
+ slug.forEach((s) => {
+ slugPath += `${s}/`
+ })
+
+ return `/project/${projectRef}/${slugPath}`
+ }
+}
+
+const Settings: NextPage = () => {
+ const router = useRouter()
+ const { routesSlug } = router.query
+
+ return (
+ <AccountLayout
+ title="Supabase"
+ // @ts-ignore
+ breadcrumbs={[
+ {
+ key: `supabase-projects`,
+ label: 'Projects',
+ },
+ ]}
+ >
+ <main style={{ maxHeight: '100vh' }} className="flex-1 overflow-y-auto">
+ <div className="p-5">
+ <Typography.Title level={4}>
+ Select the project to navigate to:{' '}
+ {Array.isArray(routesSlug)
+ ? routesSlug?.map((slug, idx) =>
+ idx === routesSlug.length - 1 ? slug : `${slug} > `
+ )
+ : ''}
+ </Typography.Title>
+ <div className="my-6 space-y-8">
+ <ProjectList
+ rewriteHref={urlRewriterFactory(routesSlug)}
+ showInactiveProjects={false}
+ onSelectDelete={() => {}}
+ onSelectRestore={() => {}}
+ />
+ </div>
+ </div>
+ </main>
+ </AccountLayout>
+ )
+}
+
+export default withAuth(observer(Settings))
diff --git a/studio/pages/settings/[[...settingsSlug]].tsx b/studio/pages/settings/[[...settingsSlug]].tsx
deleted file mode 100644
index d38ea43eeb1..00000000000
--- a/studio/pages/settings/[[...settingsSlug]].tsx
+++ /dev/null
@@ -1,47 +0,0 @@
-import { NextPage } from 'next'
-import { useRouter } from 'next/router'
-import { observer } from 'mobx-react-lite'
-
-import { withAuth } from 'hooks'
-import BaseLayout from 'components/layouts'
-import ProjectList from 'components/interfaces/Home/ProjectList'
-
-const urlRewriterFactory = (slug: string | string[] | undefined) => {
- console.log(slug)
- return (projectRef: string) => {
- if (!Array.isArray(slug)) return `/project/${projectRef}/settings/general`
- if (slug[0] === 'auth') {
- if (slug[1]) return `/project/${projectRef}/auth/${slug[1]}`
- return `/project/${projectRef}/auth/settings`
- }
- let slugPath = ''
- slug.forEach((s) => {
- slugPath += `${s}/`
- })
- return `/project/${projectRef}/settings/${slugPath}`
- }
-}
-
-const Settings: NextPage = () => {
- const router = useRouter()
- const { settingsSlug } = router.query
- return (
- <BaseLayout title={'Settings'} product="Settings">
- <main style={{ maxHeight: '100vh' }} className="flex-1 overflow-y-auto">
- <div className="p-5">
- <h1>
- Settings{Array.isArray(settingsSlug) ? settingsSlug?.map((slug) => ` > ${slug}`) : ''}
- </h1>
- <ProjectList
- rewriteHref={urlRewriterFactory(settingsSlug)}
- showInactiveProjects={false}
- onSelectDelete={() => {}}
- onSelectRestore={() => {}}
- />
- </div>
- </main>
- </BaseLayout>
- )
-}
-
-export default withAuth(observer(Settings))