Cursor for Product View

This commit is contained in:
Belen Curcio
2020-10-20 13:28:58 -03:00
parent d171a3113c
commit 5a05cb41ea
2 changed files with 22 additions and 13 deletions

16
lib/browser.ts Normal file
View File

@@ -0,0 +1,16 @@
import * as Bowser from 'bowser'
export function isDesktop(): boolean {
const browser = Bowser.getParser(window.navigator.userAgent)
return browser.getPlatform().type === 'desktop'
}
export function isMobile(): boolean {
const browser = Bowser.getParser(window.navigator.userAgent)
return browser.getPlatform().type === 'mobile'
}
export function isTablet(): boolean {
const browser = Bowser.getParser(window.navigator.userAgent)
return browser.getPlatform().type === 'tablet'
}