Skip to content

Composio powers 1000+ toolkits, tool search, context management, authentication, and a sandboxed workbench to help you build AI agents that turn intent into action.

332 B
Raw Blame
'use client';

import { usePathname } from 'next/navigation';
import { detectApiVersion, type ApiVersion } from './api-version';

/**
 * Client hook that returns the current API version based on the URL path.
 */
export function useApiVersion(): ApiVersion {
  const pathname = usePathname();
  return detectApiVersion(pathname);
}