mirror of
https://github.com/supabase/supabase.git
synced 2026-10-08 02:45:07 +03:00
* Make feature preview available for local self-host * Fix up Connect UI for local / self-host * Fix * Fix * Fix
20 lines
559 B
TypeScript
20 lines
559 B
TypeScript
import { useParams } from 'common'
|
|
import { useIsNewLayoutEnabled } from 'components/interfaces/App/FeaturePreview/FeaturePreviewContext'
|
|
import { useRouter } from 'next/router'
|
|
|
|
export function useShowLayoutHeader() {
|
|
const newLayoutPreview = useIsNewLayoutEnabled()
|
|
const { ref } = useParams()
|
|
const router = useRouter()
|
|
const pathname = router.pathname ?? ''
|
|
|
|
const shouldShow =
|
|
pathname.startsWith('/new') ||
|
|
pathname === '/organizations' ||
|
|
pathname === '/sign-in' ||
|
|
newLayoutPreview ||
|
|
Boolean(ref)
|
|
|
|
return shouldShow
|
|
}
|