Skip to content

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

adds projects page

Alaister Youngf9a41816c75c
diff --git a/studio/components/layouts/AccountLayout/AccountLayout.tsx b/studio/components/layouts/AccountLayout/AccountLayout.tsx
index 24dfbbaa732..439aa7efbd8 100644
--- a/studio/components/layouts/AccountLayout/AccountLayout.tsx
+++ b/studio/components/layouts/AccountLayout/AccountLayout.tsx
@@ -47,9 +47,9 @@ const AccountLayout: FC<Props> = ({ children, title, breadcrumbs }) => {
key: 'projects',
links: [
{
- isActive: router.pathname === '/',
+ isActive: router.pathname === '/projects',
label: 'All projects',
- href: '/',
+ href: '/projects',
key: 'all-projects-item',
},
],
diff --git a/studio/pages/projects.tsx b/studio/pages/projects.tsx
new file mode 100644
index 00000000000..217944485d8
--- /dev/null
+++ b/studio/pages/projects.tsx
@@ -0,0 +1,53 @@
+import ProjectList from 'components/interfaces/Home/ProjectList'
+import { AccountLayout } from 'components/layouts'
+import OrganizationDropdown from 'components/to-be-cleaned/Dropdown/OrganizationDropdown'
+import Connecting from 'components/ui/Loading/Loading'
+import { useStore } from 'hooks'
+import { IS_PLATFORM } from 'lib/constants'
+import { observer } from 'mobx-react-lite'
+import { NextPageWithLayout } from 'types'
+
+const ProjectsPage: NextPageWithLayout = () => {
+ const { app } = useStore()
+
+ return (
+ <>
+ {app.organizations.isLoading ? (
+ <div className="flex h-full items-center justify-center space-x-2">
+ <Connecting />
+ </div>
+ ) : (
+ <div className="py-4 px-5">
+ {IS_PLATFORM && (
+ <div className="my-2">
+ <div className="flex">
+ <div className="">
+ <OrganizationDropdown organizations={app.organizations} />
+ </div>
+ </div>
+ </div>
+ )}
+ <div className="my-8 space-y-8">
+ <ProjectList />
+ </div>
+ </div>
+ )}
+ </>
+ )
+}
+
+ProjectsPage.getLayout = (page) => (
+ <AccountLayout
+ title="Supabase"
+ breadcrumbs={[
+ {
+ key: `supabase-projects`,
+ label: 'Projects',
+ },
+ ]}
+ >
+ {page}
+ </AccountLayout>
+)
+
+export default observer(ProjectsPage)