useLayoutNavCommands.ts 1.8 KB

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