mirror of
https://github.com/supabase/supabase.git
synced 2026-10-10 11:55:05 +03:00
* Only show RR UI if project is enabled * Only show RR UI if project has read replicas enabled, shift DatabaseSelector state to valtio, add Database Selector to API URl * Update usage of Project interface from types to Project from project-details-query * Fix ts errors * Another one * Another one... * God one more * Fingers crossed * jesus * Add deprecate mark on ProjectBase * Resolve conflicts * Rename ProjectState from valtio to DatabaseSelectorState * Rename file * fix imports * tiny code changes * Fixes --------- Co-authored-by: Alaister Young <a@alaisteryoung.com>
21 lines
494 B
TypeScript
21 lines
494 B
TypeScript
import { ProductMenuGroup } from 'components/ui/ProductMenu/ProductMenu.types'
|
|
import { Project } from 'data/projects/project-detail-query'
|
|
|
|
export const generateRealtimeMenu = (project?: Project): ProductMenuGroup[] => {
|
|
const ref = project?.ref ?? 'default'
|
|
|
|
return [
|
|
{
|
|
title: 'Realtime',
|
|
items: [
|
|
{
|
|
name: 'Inspector',
|
|
key: 'inspector',
|
|
url: `/project/${ref}/realtime/inspector`,
|
|
items: [],
|
|
},
|
|
],
|
|
},
|
|
]
|
|
}
|