mirror of
https://github.com/supabase/supabase.git
synced 2026-05-20 12:30:17 +08: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.
29 lines
632 B
TypeScript
29 lines
632 B
TypeScript
'use client'
|
|
|
|
import { useCallback } from 'react'
|
|
|
|
import type {
|
|
CommandMenuOpenedEvent,
|
|
CommandMenuCommandClickedEvent,
|
|
CommandMenuSearchSubmittedEvent,
|
|
} from 'common/telemetry-constants'
|
|
import { useSendTelemetryEvent } from '@/lib/telemetry'
|
|
|
|
export function useDocsCommandMenuTelemetry() {
|
|
const sendTelemetryEvent = useSendTelemetryEvent()
|
|
|
|
const onTelemetry = useCallback(
|
|
(
|
|
event:
|
|
| CommandMenuOpenedEvent
|
|
| CommandMenuCommandClickedEvent
|
|
| CommandMenuSearchSubmittedEvent
|
|
) => {
|
|
sendTelemetryEvent(event)
|
|
},
|
|
[sendTelemetryEvent]
|
|
)
|
|
|
|
return { onTelemetry }
|
|
}
|