mirror of
https://github.com/supabase/supabase.git
synced 2026-05-09 18:30:12 -04:00
1cd1ebfc7f
Sorted all imports in all packages, `cms`, `design-system` and `ui-library` apps by running `pnpm format` on them. All changes in this PR are done by the script.
20 lines
461 B
TypeScript
20 lines
461 B
TypeScript
'use client'
|
|
|
|
import { sendTelemetryEvent } from 'common'
|
|
import { TelemetryEvent } from 'common/telemetry-constants'
|
|
import { usePathname } from 'next/navigation'
|
|
import { useCallback } from 'react'
|
|
|
|
import { API_URL } from '@/lib/constants'
|
|
|
|
export function useSendTelemetryEvent() {
|
|
const pathname = usePathname()
|
|
|
|
return useCallback(
|
|
(event: TelemetryEvent) => {
|
|
return sendTelemetryEvent(API_URL, event, pathname)
|
|
},
|
|
[pathname]
|
|
)
|
|
}
|