Skip to content

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

Stubs out some markup for project paused warning

Terry Sutton4d8e1ed83ecb
diff --git a/studio/components/layouts/ProjectLayout/ProjectPausedState.tsx b/studio/components/layouts/ProjectLayout/ProjectPausedState.tsx
index 45aa0b1b87e..ba65064971d 100644
--- a/studio/components/layouts/ProjectLayout/ProjectPausedState.tsx
+++ b/studio/components/layouts/ProjectLayout/ProjectPausedState.tsx
@@ -1,42 +1,41 @@
import { FC } from 'react'
import { observer } from 'mobx-react-lite'
-import { Badge, IconLoader, IconMonitor, IconServer } from '@supabase/ui'
+import { IconAlertCircle, IconPauseCircle } from '@supabase/ui'
import { Project } from 'types'
-// interface Props {
-// project: Project
-// }
+interface Props {
+ project: Project
+}
-//const ProjectPausedState: FC<Props> = ({ project }) => {
-const ProjectPausedState = () => {
+const ProjectPausedState: FC<Props> = ({ project }) => {
return (
<>
- <div className="mx-auto my-16 w-full max-w-7xl space-y-16">
- <div className="mx-6 space-y-16">
+ <div className="mx-auto mt-8 mb-16 w-full max-w-7xl space-y-8">
+ <div className="mx-6 space-y-8">
<div className="flex flex-col space-y-4 lg:flex-row lg:items-center lg:space-y-0 lg:space-x-6">
- <h1 className="text-3xl">PROJECT NAME</h1>
- <div>
- <Badge color="brand">
- <div className="flex items-center gap-2">
- <IconLoader className="animate-spin" size={12} />
- <span>Connecting to project</span>
- </div>
- </Badge>
- </div>
</div>
<div className="bg-scale-300 border-scale-400 flex h-[500px] items-center justify-center rounded border p-8">
<div className="w-[420px] space-y-4">
<div className="mx-auto flex max-w-[300px] items-center justify-center space-x-4 lg:space-x-8">
- <IconMonitor className="text-scale-1100" size={50} strokeWidth={1.5} />
- <IconServer className="text-scale-1100" size={50} strokeWidth={1.5} />
+ <IconPauseCircle className="text-scale-1100" size={50} strokeWidth={1.5} />
</div>
<div className="space-y-1">
- <p className="text-center">Connecting to PROJECT NAME</p>
+ <p className="text-center">This project is paused.</p>
</div>
- <div className="flex flex-col items-center"></div>
+ <div className="flex flex-col items-center">
+ Restore / Delete
+ </div>
+
+ <div className="flex gap-4">
+ <IconAlertCircle className="text-red-900" size={35} strokeWidth={2} />
+ <div>
+ <p className='text-lg'>Your account can only have <u>2 free projects.</u></p>
+ <p className='text-scale-900'>To restore this project you'll need to pause or delete an existing free project first.</p>
+ </div>
+ </div>
</div>
</div>
</div>
diff --git a/studio/pages/project/[ref]/index.tsx b/studio/pages/project/[ref]/index.tsx
index caa45c32d0e..a7c22512b98 100644
--- a/studio/pages/project/[ref]/index.tsx
+++ b/studio/pages/project/[ref]/index.tsx
@@ -1,5 +1,5 @@
import { observer } from 'mobx-react-lite'
-import { Typography } from '@supabase/ui'
+import { Badge, IconPauseCircle, Typography } from '@supabase/ui'
import { useStore } from 'hooks'
import { ExampleProject, ClientLibrary } from 'components/interfaces/Home'
import { CLIENT_LIBRARIES, EXAMPLE_PROJECTS } from 'components/interfaces/Home/Home.constants'
@@ -14,7 +14,7 @@ const Home: NextPageWithLayout = () => {
const { ui } = useStore()
const project = ui.selectedProject
- console.log(toJS(project))
+ console.log( toJS( project ) )
const projectName =
project?.ref !== 'default' && project?.name !== undefined
? project?.name
@@ -24,19 +24,29 @@ const Home: NextPageWithLayout = () => {
<div className="mx-auto my-16 w-full max-w-7xl space-y-16">
<div className="mx-6 flex items-center space-x-6">
<h1 className="text-3xl">{projectName}</h1>
+ {project?.status == 'INACTIVE' && (
+ <div className='mt-2'>
+ <Badge color="gray">
+ <div className="flex items-center gap-2">
+ <IconPauseCircle size={15} />
+ <span>Project paused</span>
+ </div>
+ </Badge>
+ </div>
+ )}
</div>
- {project && project?.status == 'INACTIVE' && <h2>hello everyone</h2>}
+ {project && project?.status == 'INACTIVE' && <ProjectPausedState project={project} />}
+ {IS_PLATFORM && project?.status !== 'INACTIVE' && <ProjectUsageSection />}
- {/* {IS_PLATFORM && project?.status !== 'INACTIVE' && <ProjectUsageSection />} */}
<div className="space-y-8">
<div className="mx-6">
<Typography.Title level={4}>Client libraries</Typography.Title>
</div>
<div className="mx-6 mb-12 grid gap-12 md:grid-cols-3">
- {CLIENT_LIBRARIES.map((library) => (
+ {CLIENT_LIBRARIES.map( ( library ) => (
<ClientLibrary key={library.language} {...library} />
- ))}
+ ) )}
</div>
</div>
<div className="space-y-8">
@@ -44,15 +54,15 @@ const Home: NextPageWithLayout = () => {
<Typography.Title level={4}>Example projects</Typography.Title>
</div>
<div className="mx-6 grid gap-8 md:grid-cols-2 lg:grid-cols-3">
- {EXAMPLE_PROJECTS.map((project) => (
+ {EXAMPLE_PROJECTS.map( ( project ) => (
<ExampleProject key={project.url} {...project} />
- ))}
+ ) )}
</div>
</div>
</div>
)
}
-Home.getLayout = (page) => <ProjectLayoutWithAuth>{page}</ProjectLayoutWithAuth>
+Home.getLayout = ( page ) => <ProjectLayoutWithAuth>{page}</ProjectLayoutWithAuth>
-export default observer(Home)
+export default observer( Home )