uniswap-interface-uncensored/src/utils/userAgent.ts
2021-09-24 08:13:40 -07:00

9 lines
242 B
TypeScript

import { UAParser } from 'ua-parser-js'
const parser = new UAParser(window.navigator.userAgent)
const { type } = parser.getDevice()
export const userAgent = parser.getResult()
export const isMobile = type === 'mobile' || type === 'tablet'