mirror of
https://github.com/supabase/supabase.git
synced 2026-10-08 19:05:06 +03:00
54 lines
1.4 KiB
TypeScript
54 lines
1.4 KiB
TypeScript
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)
|