mirror of
https://github.com/supabase/supabase.git
synced 2026-10-08 02:45:07 +03:00
15 lines
363 B
TypeScript
15 lines
363 B
TypeScript
'use client'
|
|
|
|
import { useRouter } from 'next/compat/router'
|
|
import { isBrowser } from '../helpers'
|
|
|
|
export function useTelemetryProps() {
|
|
const router = useRouter()
|
|
const locale = router ? router.locale : undefined
|
|
|
|
return {
|
|
screenResolution: isBrowser ? `${window.innerWidth}x${window.innerHeight}` : undefined,
|
|
language: locale ?? 'en-US',
|
|
}
|
|
}
|