Files
supabase/apps/studio/components/layouts/useLayoutNavCommands.ts
Drake Costa 57cd26ac77 Move non-layout Storage components to components/interfaces (#37381)
* Update studio testing setup files

Improves API mocking type safety and polyfills browser APIs necessary to run tests with framer-motion components

* fix missing listen call for msw, resolve test type error

* fix imports

* Update studio testing setup files

Improves API mocking type safety and polyfills browser APIs necessary to run tests with framer-motion components

* fix missing listen call for msw, resolve test type error

* fix imports

* Move non-layout Storage related components to `components/interfaces`

* Fix paths

---------

Co-authored-by: Joshen Lim <joshenlimek@gmail.com>
2025-07-22 23:48:20 +08:00

31 lines
1.7 KiB
TypeScript

import { useIsLoggedIn } from 'common'
import { useApiDocsGotoCommands } from 'components/interfaces/ProjectAPIDocs/ProjectAPIDocs.Commands'
import { useAdvisorsGoToCommands } from './AdvisorsLayout/Advisors.Commands'
import { useAuthGotoCommands } from './AuthLayout/Auth.Commands'
import { useDatabaseGotoCommands } from './DatabaseLayout/Database.Commands'
import { useFunctionsGotoCommands } from './EdgeFunctionsLayout/EdgeFunctions.Commands'
import { useIntegrationsGotoCommands } from './IntegrationsLayout/Integrations.Commands'
import { useLogsGotoCommands } from './LogsLayout/Logs.Commands'
import { useProjectSettingsGotoCommands } from './ProjectSettingsLayout/ProjectSettings.Commands'
import { useReportsGotoCommands } from './ReportsLayout/Reports.Commands'
import { useSqlEditorGotoCommands } from './SQLEditorLayout/SqlEditor.Commands'
import { useStorageGotoCommands } from '../interfaces/Storage/Storage.Commands'
import { useTableEditorGotoCommands } from './TableEditorLayout/TableEditor.Commands'
export function useLayoutNavCommands() {
const isLoggedIn = useIsLoggedIn()
useTableEditorGotoCommands({ enabled: isLoggedIn })
useSqlEditorGotoCommands({ enabled: isLoggedIn })
useDatabaseGotoCommands({ enabled: isLoggedIn })
useAuthGotoCommands({ enabled: isLoggedIn })
useAdvisorsGoToCommands({ enabled: isLoggedIn })
useStorageGotoCommands({ enabled: isLoggedIn })
useFunctionsGotoCommands({ enabled: isLoggedIn })
useLogsGotoCommands({ enabled: isLoggedIn })
useReportsGotoCommands({ enabled: isLoggedIn })
useApiDocsGotoCommands({ enabled: isLoggedIn })
useProjectSettingsGotoCommands({ enabled: isLoggedIn })
useIntegrationsGotoCommands({ enabled: isLoggedIn })
}