Files
Ivan Vasilov bbfccdf471 chore: Use @/* as an alias for importing in-package files (#41607)
* Remove extra file.

* Remove unneeded tsconfig.jsons.

* Add @/* alias for importing in-package files to all apps.

* Remove baseUrl from all apps except studio (it'll require changes in almost all files).

* Fix baseUrl issues in docs, ui-library and design-system.

* Fix the typecheck for cms app. Fix all baseUrl errors in the cms app.

* Add deprecated flag to baseUrl in www.
2025-12-30 17:46:24 +01:00

20 lines
461 B
TypeScript

'use client'
import { usePathname } from 'next/navigation'
import { useCallback } from 'react'
import { sendTelemetryEvent } from 'common'
import { TelemetryEvent } from 'common/telemetry-constants'
import { API_URL } from '@/lib/constants'
export function useSendTelemetryEvent() {
const pathname = usePathname()
return useCallback(
(event: TelemetryEvent) => {
return sendTelemetryEvent(API_URL, event, pathname)
},
[pathname]
)
}