useLayoutNavCommands.ts33 lines · main
1import { useIsLoggedIn } from 'common'
2
3import { useStorageGotoCommands } from '../interfaces/Storage/Storage.Commands'
4import { useAdvisorsGoToCommands } from './AdvisorsLayout/Advisors.Commands'
5import { useAuthGotoCommands } from './AuthLayout/Auth.Commands'
6import { useBillingGotoCommands } from './BillingLayout/Billing.Commands'
7import { useDatabaseGotoCommands } from './DatabaseLayout/Database.Commands'
8import { useFunctionsGotoCommands } from './EdgeFunctionsLayout/EdgeFunctions.Commands'
9import { useIntegrationsGotoCommands } from './IntegrationsLayout/Integrations.Commands'
10import { useLogsGotoCommands } from './LogsLayout/Logs.Commands'
11import { useProjectSettingsGotoCommands } from './ProjectSettingsLayout/ProjectSettings.Commands'
12import { useReportsGotoCommands } from './ReportsLayout/Reports.Commands'
13import { useSqlEditorGotoCommands } from './SQLEditorLayout/SqlEditor.Commands'
14import { useTableEditorGotoCommands } from './TableEditorLayout/TableEditor.Commands'
15import { useApiDocsGotoCommands } from '@/components/interfaces/ProjectAPIDocs/ProjectAPIDocs.Commands'
16
17export function useLayoutNavCommands() {
18 const isLoggedIn = useIsLoggedIn()
19
20 useTableEditorGotoCommands({ enabled: isLoggedIn })
21 useSqlEditorGotoCommands({ enabled: isLoggedIn })
22 useDatabaseGotoCommands({ enabled: isLoggedIn })
23 useAuthGotoCommands({ enabled: isLoggedIn })
24 useAdvisorsGoToCommands({ enabled: isLoggedIn })
25 useStorageGotoCommands({ enabled: isLoggedIn })
26 useFunctionsGotoCommands({ enabled: isLoggedIn })
27 useLogsGotoCommands({ enabled: isLoggedIn })
28 useReportsGotoCommands({ enabled: isLoggedIn })
29 useApiDocsGotoCommands({ enabled: isLoggedIn })
30 useProjectSettingsGotoCommands({ enabled: isLoggedIn })
31 useIntegrationsGotoCommands({ enabled: isLoggedIn })
32 useBillingGotoCommands({ enabled: isLoggedIn })
33}