Files
supabase/apps/studio/components/layouts/Integrations/IntegrationsMenu.utils.ts
T
Francesco Sansalvadore 23c827bdda feat: nested mobile nav menu (#43333)
- consolidate `top level menu` and `contextual menu` into nested menu on
mobile
- remove legacy mobile submenu
2026-03-11 13:55:20 +01:00

45 lines
1.1 KiB
TypeScript

import type { ProductMenuGroup } from 'components/ui/ProductMenu/ProductMenu.types'
export function generateIntegrationsMenu({
projectRef,
flags,
}: {
projectRef?: string
flags?: { showWrappers: boolean }
}): ProductMenuGroup[] {
const { showWrappers } = flags ?? {}
return [
{
title: 'Explore',
items: [
{
name: 'All',
key: 'integrations',
url: `/project/${projectRef}/integrations`,
pages: ['integrations'],
items: [],
},
...(showWrappers
? [
{
name: 'Wrappers',
key: 'integrations-wrapper',
url: `/project/${projectRef}/integrations?category=wrapper`,
pages: ['integrations?category=wrapper'],
items: [],
},
]
: []),
{
name: 'Postgres Modules',
key: 'integrations-postgres_extension',
url: `/project/${projectRef}/integrations?category=postgres_extension`,
pages: ['integrations?category=postgres_extension'],
items: [],
},
],
},
]
}