mirror of
https://github.com/supabase/supabase.git
synced 2026-10-15 22:29:11 +03:00
* Make feature preview available for local self-host * Fix up Connect UI for local / self-host * Fix * Fix * Fix
17 lines
513 B
TypeScript
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
|
|
}
|