favycon/utils/device.ts
Rui Saraiva 20f009e848
feat: responsive version (#113)
* feat: wip - responsive version

* chore(config): update eslint config

* fix: align drop zone footer

* fix: add prop for immutable colors

* fix: container width issue on tablet

* chore: change class name convention

* chore: add missing error styles on mobile

* style(viewport): add 100vh fix for safari

* style: update bottom info padding on mobile

* perf: remove getInitialProps function and dependencies

* chore(deps): update sharp to v0.25.0

* chore: delete unused hook

* docs: add @miguellteixeira as a contributor

* test(cypress): update page load wait

* feat(responsive): update code modal for mobile

* feat(responsive): update background images and light/dark toggle color

* feat(responsive): add about us modal on mobile

* feat(responsive): update sharable image

Co-authored-by: Miguel Teixeira <teixeira.silva.miguel@gmail.com>
2020-09-10 17:57:57 +01:00

13 lines
301 B
TypeScript

export const isTouchCapable = () => {
if (typeof window === 'undefined') {
return false
}
return (
'ontouchstart' in window ||
// @ts-ignore
(window.DocumentTouch && document instanceof window.DocumentTouch) ||
navigator.maxTouchPoints > 0 ||
window.navigator.msMaxTouchPoints > 0
)
}