mobileOrgMenuRegistry.tsx 695 B

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