Home / Function/ getMenuId() — supabase Function Reference

getMenuId() — supabase Function Reference

Architecture documentation for the getMenuId() function in NavigationMenu.utils.ts from the supabase codebase.

Entity Profile

Dependency Diagram

graph TD
  9b299289_e1d2_9370_40e3_8e057fa3d09a["getMenuId()"]
  5f4db0c7_143a_6760_4b0f_51f5fff05cce["useBreadcrumbs()"]
  5f4db0c7_143a_6760_4b0f_51f5fff05cce -->|calls| 9b299289_e1d2_9370_40e3_8e057fa3d09a
  e211d40b_0256_3b3c_951b_d9a9b265c15e["SidebarSkeleton()"]
  e211d40b_0256_3b3c_951b_d9a9b265c15e -->|calls| 9b299289_e1d2_9370_40e3_8e057fa3d09a
  style 9b299289_e1d2_9370_40e3_8e057fa3d09a fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

apps/docs/components/Navigation/NavigationMenu/NavigationMenu.utils.ts lines 109–156

export const getMenuId = (pathname: string | null) => {
  pathname = (pathname ??= '').replace(/^\/guides\//, '')

  switch (true) {
    case pathname.startsWith('ai'):
      return MenuId.Ai
    case pathname.startsWith('api'):
      return MenuId.Api
    case pathname.startsWith('auth'):
      return MenuId.Auth
    case pathname.startsWith('cron'):
      return MenuId.Cron
    case pathname.startsWith('database'):
      return MenuId.Database
    case pathname.startsWith('deployment'):
      return MenuId.Deployment
    case pathname.startsWith('functions'):
      return MenuId.Functions
    case pathname.startsWith('getting-started'):
      return MenuId.GettingStarted
    case pathname.startsWith('graphql'):
      return MenuId.Graphql
    case pathname.startsWith('integrations'):
      return MenuId.Integrations
    case pathname.startsWith('local-development'):
      return MenuId.LocalDevelopment
    case pathname.startsWith('telemetry'):
      return MenuId.Telemetry
    case pathname.startsWith('platform'):
      return MenuId.Platform
    case pathname.startsWith('queues'):
      return MenuId.Queues
    case pathname.startsWith('realtime'):
      return MenuId.Realtime
    case pathname.startsWith('resources'):
      return MenuId.Resources
    case pathname.startsWith('security'):
      return MenuId.Security
    case pathname.startsWith('self-hosting'):
      return MenuId.SelfHosting
    case pathname.startsWith('storage'):
      return MenuId.Storage
    case pathname.startsWith('/contributing'):
      return MenuId.Contributing
    default:
      return MenuId.GettingStarted
  }
}

Subdomains

Frequently Asked Questions

What does getMenuId() do?
getMenuId() is a function in the supabase codebase.
What calls getMenuId()?
getMenuId() is called by 2 function(s): SidebarSkeleton, useBreadcrumbs.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free