forked from abner/for-legacy-web
Add Redux and reducers.
Load i18n files and add dayjs.
This commit is contained in:
7
src/lib/isTouchscreenDevice.ts
Normal file
7
src/lib/isTouchscreenDevice.ts
Normal file
@@ -0,0 +1,7 @@
|
||||
import { isDesktop, isMobile, isTablet } from "react-device-detect";
|
||||
export const isTouchscreenDevice =
|
||||
isDesktop && !isTablet
|
||||
? false
|
||||
: (typeof window !== "undefined"
|
||||
? navigator.maxTouchPoints > 0
|
||||
: false) || isMobile;
|
||||
Reference in New Issue
Block a user