mirror of
https://github.com/supabase/supabase.git
synced 2026-10-07 18:35:07 +03:00
13 lines
304 B
TypeScript
13 lines
304 B
TypeScript
import { useRouter } from 'next/router'
|
|
|
|
const isBrowser = typeof window !== 'undefined'
|
|
|
|
export function useTelemetryProps() {
|
|
const { locale } = useRouter()
|
|
|
|
return {
|
|
screenResolution: isBrowser ? `${window.innerWidth}x${window.innerHeight}` : undefined,
|
|
language: locale ?? 'en-US',
|
|
}
|
|
}
|