mirror of
https://github.com/supabase/supabase.git
synced 2026-10-06 09:55:06 +03:00
- consolidate `top level menu` and `contextual menu` into nested menu on mobile - remove legacy mobile submenu
45 lines
1.1 KiB
TypeScript
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: [],
|
|
},
|
|
],
|
|
},
|
|
]
|
|
}
|