Skip to content

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

Hide V1 layout header for self hosted since unnecessary

Joshen Lime67c053b5277
diff --git a/studio/components/layouts/AccountLayout/WithSidebar.tsx b/studio/components/layouts/AccountLayout/WithSidebar.tsx
index cdf48e39a65..eecb7d020e5 100644
--- a/studio/components/layouts/AccountLayout/WithSidebar.tsx
+++ b/studio/components/layouts/AccountLayout/WithSidebar.tsx
@@ -1,7 +1,7 @@
import { useFlag } from 'hooks'
import { isUndefined } from 'lodash'
import Link from 'next/link'
-import { FC, ReactNode } from 'react'
+import { ReactNode } from 'react'
import { Badge, IconArrowUpRight, IconLogOut, Menu } from 'ui'
import LayoutHeader from '../ProjectLayout/LayoutHeader'
import { SidebarLink, SidebarSection } from './AccountLayout.types'
@@ -104,11 +104,7 @@ interface SectionWithHeadersProps {
subitemsParentKey?: number
}
-const SectionWithHeaders: FC<SectionWithHeadersProps> = ({
- section,
- subitems,
- subitemsParentKey,
-}) => (
+const SectionWithHeaders = ({ section, subitems, subitemsParentKey }: SectionWithHeadersProps) => (
<div key={section.heading} className="border-b py-5 px-6 border-scale-500">
{section.heading && <Menu.Group title={section.heading} />}
{section.versionLabel && (
@@ -131,7 +127,7 @@ interface SidebarItemProps {
subitemsParentKey?: number
}
-const SidebarItem: FC<SidebarItemProps> = ({ links, subitems, subitemsParentKey }) => {
+const SidebarItem = ({ links, subitems, subitemsParentKey }: SidebarItemProps) => {
return (
<ul className="space-y-1">
{links.map((link, i: number) => {
@@ -174,7 +170,7 @@ interface SidebarLinkProps extends SidebarLink {
isSubitem?: boolean
}
-const SidebarLinkItem: FC<SidebarLinkProps> = ({
+const SidebarLinkItem = ({
id,
label,
href,
@@ -182,7 +178,7 @@ const SidebarLinkItem: FC<SidebarLinkProps> = ({
isSubitem,
isExternal,
onClick,
-}) => {
+}: SidebarLinkProps) => {
if (isUndefined(href)) {
let icon
if (isExternal) {
diff --git a/studio/components/layouts/ProjectLayout/ProjectLayout.tsx b/studio/components/layouts/ProjectLayout/ProjectLayout.tsx
index 4b23582c1ef..291df460264 100644
--- a/studio/components/layouts/ProjectLayout/ProjectLayout.tsx
+++ b/studio/components/layouts/ProjectLayout/ProjectLayout.tsx
@@ -5,7 +5,7 @@ import { Fragment, PropsWithChildren, ReactNode } from 'react'
import { useParams } from 'common/hooks'
import Connecting from 'components/ui/Loading'
import { useFlag, useSelectedOrganization, useSelectedProject, withAuth } from 'hooks'
-import { PROJECT_STATUS } from 'lib/constants'
+import { PROJECT_STATUS, IS_PLATFORM } from 'lib/constants'
import BuildingState from './BuildingState'
import ConnectingState from './ConnectingState'
import LayoutHeader from './LayoutHeader'
@@ -101,7 +101,7 @@ const ProjectLayout = ({
)}
<main className="flex flex-col flex-1 w-full overflow-x-hidden">
- {!navLayoutV2 && !hideHeader && <LayoutHeader />}
+ {!navLayoutV2 && !hideHeader && IS_PLATFORM && <LayoutHeader />}
{showPausedState ? (
<div className="mx-auto my-16 w-full h-full max-w-7xl flex items-center">
<div className="w-full">
@@ -236,7 +236,7 @@ export const ProjectLayoutNonBlocking = ({
)}
<main className="flex w-full flex-1 flex-col overflow-x-hidden">
- {!navLayoutV2 && !hideHeader && <LayoutHeader />}
+ {!navLayoutV2 && !hideHeader && IS_PLATFORM && <LayoutHeader />}
{showPausedState ? (
<div className="mx-auto my-16 w-full h-full max-w-7xl flex items-center">
<div className="w-full">