Skip to content

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

chore: clean up

phamhieu5622d0e74b46
diff --git a/studio/components/layouts/ProjectLayout/ProjectLayout.tsx b/studio/components/layouts/ProjectLayout/ProjectLayout.tsx
index be75878a99f..38de7719bf5 100644
--- a/studio/components/layouts/ProjectLayout/ProjectLayout.tsx
+++ b/studio/components/layouts/ProjectLayout/ProjectLayout.tsx
@@ -76,15 +76,14 @@ interface ContentWrapperProps {
const ContentWrapper: FC<ContentWrapperProps> = observer(({ isLoading, children }) => {
const { ui } = useStore()
const router = useRouter()
- const project = ui.selectedProject
const requiresDbConnection: boolean = router.pathname !== '/project/[ref]/settings/general'
return (
<>
- {isLoading || project === undefined ? (
+ {isLoading || ui.selectedProject === undefined ? (
<Connecting />
) : requiresDbConnection ? (
- <TestConnection project={project!}>
+ <TestConnection project={ui.selectedProject!}>
<div className="flex flex-col flex-1 overflow-y-auto">{children}</div>
</TestConnection>
) : (
diff --git a/studio/pages/project/[ref]/index.tsx b/studio/pages/project/[ref]/index.tsx
index 36d861d5660..4cb7affddc4 100644
--- a/studio/pages/project/[ref]/index.tsx
+++ b/studio/pages/project/[ref]/index.tsx
@@ -5,7 +5,7 @@ import { useStore, withAuth } from 'hooks'
import { ExampleProject, ClientLibrary } from 'components/interfaces/Home'
import { CLIENT_LIBRARIES, EXAMPLE_PROJECTS } from 'components/interfaces/Home/Home.constants'
import { IS_PLATFORM } from 'lib/constants'
-import BaseLayout from 'components/layouts'
+import ProjectLayout from 'components/layouts'
import ProjectUsageSection from 'components/interfaces/Home/ProjectUsageSection'
const Home: NextPage = () => {
@@ -18,7 +18,7 @@ const Home: NextPage = () => {
: 'Welcome to your project'
return (
- <BaseLayout>
+ <ProjectLayout>
<div className="max-w-7xl mx-auto w-full my-16 space-y-16">
<div className="mx-6 flex space-x-6 items-center">
<h1 className="text-3xl">{projectName}</h1>
@@ -45,7 +45,7 @@ const Home: NextPage = () => {
</div>
</div>
</div>
- </BaseLayout>
+ </ProjectLayout>
)
}