mirror of
https://github.com/supabase/supabase.git
synced 2026-05-09 18:30:12 -04:00
23c827bdda
- consolidate `top level menu` and `contextual menu` into nested menu on mobile - remove legacy mobile submenu
23 lines
695 B
TypeScript
23 lines
695 B
TypeScript
import React, { type ComponentType } from 'react'
|
|
|
|
/**
|
|
* Lazy-loaded org menu components for the mobile org sheet submenu.
|
|
* Sections without a dedicated submenu map to null (they navigate directly).
|
|
*/
|
|
export const MOBILE_ORG_MENU_REGISTRY: Record<string, ComponentType<any> | null> = {
|
|
projects: null,
|
|
team: null,
|
|
integrations: null,
|
|
usage: null,
|
|
billing: null,
|
|
settings: React.lazy(() =>
|
|
import('@/components/layouts/ProjectLayout/OrganizationSettingsMenu').then((m) => ({
|
|
default: m.OrganizationSettingsMenu,
|
|
}))
|
|
),
|
|
}
|
|
|
|
export function getOrgMenuComponent(sectionKey: string): ComponentType<any> | null {
|
|
return MOBILE_ORG_MENU_REGISTRY[sectionKey] ?? null
|
|
}
|