mobileOrgMenuRegistry.tsx22 lines · main
| 1 | import React, { type ComponentType } from 'react' |
| 2 | |
| 3 | /** |
| 4 | * Lazy-loaded org menu components for the mobile org sheet submenu. |
| 5 | * Sections without a dedicated submenu map to null (they navigate directly). |
| 6 | */ |
| 7 | export const MOBILE_ORG_MENU_REGISTRY: Record<string, ComponentType<any> | null> = { |
| 8 | projects: null, |
| 9 | team: null, |
| 10 | integrations: null, |
| 11 | usage: null, |
| 12 | billing: null, |
| 13 | settings: React.lazy(() => |
| 14 | import('@/components/layouts/ProjectLayout/OrganizationSettingsMenu').then((m) => ({ |
| 15 | default: m.OrganizationSettingsMenu, |
| 16 | })) |
| 17 | ), |
| 18 | } |
| 19 | |
| 20 | export function getOrgMenuComponent(sectionKey: string): ComponentType<any> | null { |
| 21 | return MOBILE_ORG_MENU_REGISTRY[sectionKey] ?? null |
| 22 | } |