Files
supabase/apps/studio/hooks/misc/useHideSidebar.ts
T
Joshen Lim fd10704cc1 Make feature preview available + Fix up Connect UI for local self-host (#35060)
* Make feature preview available for local self-host

* Fix up Connect UI for local / self-host

* Fix

* Fix

* Fix
2025-04-16 19:35:09 +08:00

17 lines
513 B
TypeScript

import { usePathname } from 'next/navigation'
import { useIsNewLayoutEnabled } from 'components/interfaces/App/FeaturePreview/FeaturePreviewContext'
export function useHideSidebar() {
const newLayoutPreview = useIsNewLayoutEnabled()
const pathname = usePathname() ?? ''
const shouldHide =
pathname.startsWith('/account') ||
pathname.startsWith('/new') ||
pathname === '/organizations' ||
pathname === '/sign-in' ||
(pathname === '/projects' && newLayoutPreview)
return shouldHide
}