Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.
Mirrored from https://github.com/Camo67/composio.git
Synced Nov 21, 03:37 UTC
| 1 | 'use client'; |
| 2 | |
| 3 | import { usePathname } from 'next/navigation'; |
| 4 | import { detectApiVersion, type ApiVersion } from './api-version'; |
| 5 | |
| 6 | /** |
| 7 | * Client hook that returns the current API version based on the URL path. |
| 8 | */ |
| 9 | export function useApiVersion(): ApiVersion { |
| 10 | const pathname = usePathname(); |
| 11 | return detectApiVersion(pathname); |
| 12 | } |