mirror of
https://github.com/supabase/supabase.git
synced 2026-10-10 20:05:06 +03:00
* 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.
20 lines
461 B
TypeScript
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]
|
|
)
|
|
}
|