The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
import { useCallback } from 'react'
import type {
CommandMenuClosedEvent,
CommandMenuCommandClickedEvent,
CommandMenuOpenedEvent,
CommandMenuSearchSubmittedEvent,
} from 'common/telemetry-constants'
import { useSendTelemetryEvent } from 'lib/telemetry'
export function useWwwCommandMenuTelemetry() {
const sendTelemetryEvent = useSendTelemetryEvent()
const onTelemetry = useCallback(
(
event:
| CommandMenuOpenedEvent
| CommandMenuClosedEvent
| CommandMenuCommandClickedEvent
| CommandMenuSearchSubmittedEvent
) => {
sendTelemetryEvent(event)
},
[sendTelemetryEvent]
)
return { onTelemetry }
}