mirror of
https://github.com/supabase/supabase.git
synced 2026-05-09 10:19:50 -04:00
4a0bb36ca8
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Co-authored-by: Ivan Vasilov <vasilov.ivan@gmail.com>
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: [],
|
|
},
|
|
],
|
|
},
|
|
]
|
|
}
|