mirror of
https://github.com/supabase/supabase.git
synced 2026-10-16 06:39:09 +03:00
18 lines
675 B
TypeScript
18 lines
675 B
TypeScript
// Anchored to the section root so per-resource log pages (e.g. a single edge
|
|
// function's logs) don't pull the banner outside Logs/Observability.
|
|
const LOGS_SECTION_PATH = /^\/project\/[^/]+\/(logs|observability)(\/|$)/
|
|
|
|
export function isLogsOrObservabilityPath(pathname: string | null | undefined): boolean {
|
|
if (!pathname) return false
|
|
return LOGS_SECTION_PATH.test(pathname)
|
|
}
|
|
|
|
const ORGANIZATION_HOME_PATH = /^\/org\/[^/]+\/?$/
|
|
|
|
export function isOrganizationLandingPath(pathname: string | null | undefined): boolean {
|
|
if (!pathname) return false
|
|
return (
|
|
pathname === '/org' || pathname === '/organizations' || ORGANIZATION_HOME_PATH.test(pathname)
|
|
)
|
|
}
|