mirror of
https://github.com/supabase/supabase.git
synced 2026-10-14 21:59:16 +03:00
* Add flags for policies, third party auth, and manual linking + providers in sign in page * Add flag for rate limitm page * Add UnknownInterface components * Update comment * Flip flags to true * Add flags for realtime policies and reports page * Temp * Add flag for sign in providers page * Add flag for stripe wrapper * Add flag for custom domains * Add flag for dedicated ipv4 address addon * Add empty state for realtime policies * Add empty state for reports page * Add flag for disable legacy JWT keys section * Add flag for legacy jwt keys * nit * Remove ConnectionStringMoved call out * Add flag for project settings log drains * Add flag for subscription link in project settings * Deprecate settings/auth page and redirect directly to auth page * Flip back flags * Add flags for account preferences analytics marketing and account deleetion * Remove 'table_editor:enable_rls_toggle' flag and revert UI changes * Remove 'authentication:policies' flag and revert UI changes * Add flags for cmd K routes * Add flags for instance size in infra settings * Small refactor to DisplayApiSettings, decouple ToggleLegacyApiKeysPanel from it * Have project_connection:javascript_example toggle code example title to TS * add flag for templates dropdown in logs explorer * UsesOverview only show link to providers page if providers is enabled * API Docs UserManagement to only include docs on third party auth if providers is enabled * Hide instance size on project card if flag is off * Fix cmd k for roles, update redirect link from settings/auth to auth/providers
52 lines
1.6 KiB
TypeScript
52 lines
1.6 KiB
TypeScript
import { useParams } from 'common'
|
|
import { COMMAND_MENU_SECTIONS } from 'components/interfaces/App/CommandMenu/CommandMenu.utils'
|
|
import { useIsFeatureEnabled } from 'hooks/misc/useIsFeatureEnabled'
|
|
import type { CommandOptions } from 'ui-patterns/CommandMenu'
|
|
import { useRegisterCommands } from 'ui-patterns/CommandMenu'
|
|
|
|
export function useReportsGotoCommands(options?: CommandOptions) {
|
|
let { ref } = useParams()
|
|
ref ||= '_'
|
|
|
|
const { reportsAll } = useIsFeatureEnabled(['reports:all'])
|
|
|
|
useRegisterCommands(
|
|
COMMAND_MENU_SECTIONS.NAVIGATE,
|
|
reportsAll
|
|
? [
|
|
{
|
|
id: 'nav-reports',
|
|
name: 'Reports',
|
|
route: `/project/${ref}/reports`,
|
|
defaultHidden: true,
|
|
},
|
|
{
|
|
id: 'nav-reports-api',
|
|
name: 'API Reports',
|
|
route: `/project/${ref}/reports/api-overview`,
|
|
defaultHidden: true,
|
|
},
|
|
{
|
|
id: 'nav-reports-storage',
|
|
name: 'Storage Reports',
|
|
route: `/project/${ref}/reports/storage`,
|
|
defaultHidden: true,
|
|
},
|
|
{
|
|
id: 'nav-reports-database',
|
|
name: 'Database Reports',
|
|
route: `/project/${ref}/reports/database`,
|
|
defaultHidden: true,
|
|
},
|
|
{
|
|
id: 'nav-reports-query-performance',
|
|
name: 'Query Performance Reports',
|
|
route: `/project/${ref}/reports/query-performance`,
|
|
defaultHidden: true,
|
|
},
|
|
]
|
|
: [],
|
|
{ ...options, deps: [ref] }
|
|
)
|
|
}
|