Skip to content

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

675 B
Raw Blame
// 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)
  )
}