Files
supabase/apps/studio/components/layouts/RealtimeLayout/RealtimeMenu.utils.ts
T
Filipe CabaçoandJoshen Lim a8a5e68512 realtime: remove feature preview flag (#38864)
* realtime: remove feature preview flag

* Fix TS

* Smol fix

* NIt

* add back proper link in docs

* Neeeet

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2025-09-22 17:56:38 +07:00

44 lines
1.0 KiB
TypeScript

import type { ProductMenuGroup } from 'components/ui/ProductMenu/ProductMenu.types'
import type { Project } from 'data/projects/project-detail-query'
import { IS_PLATFORM } from 'lib/constants'
export const generateRealtimeMenu = (project: Project): ProductMenuGroup[] => {
const ref = project?.ref ?? 'default'
const showRealtimeSettings = IS_PLATFORM
return [
{
title: 'Tools',
items: [
{
name: 'Inspector',
key: 'inspector',
url: `/project/${ref}/realtime/inspector`,
items: [],
},
],
},
{
title: 'Configuration',
items: [
{
name: 'Policies',
key: 'policies',
url: `/project/${ref}/realtime/policies`,
items: [],
},
...(showRealtimeSettings
? [
{
name: 'Settings',
key: 'settings',
url: `/project/${ref}/realtime/settings`,
items: [],
},
]
: []),
],
},
]
}