1
0
mirror of https://github.com/locomotivemtl/locomotive-boilerplate.git synced 2026-01-15 00:55:08 +08:00

Fix device detection on config.js

This commit is contained in:
Lucas Vallenet
2023-09-05 09:40:19 +02:00
parent b5753148f1
commit 7f1b6dad2e
4 changed files with 8 additions and 8 deletions

View File

@@ -9,7 +9,7 @@
*/
const NODE_ENV = process.env.NODE_ENV
const IS_DESKTOP = typeof window.orientation === 'undefined'
const IS_MOBILE = window.matchMedia('(any-pointer:coarse)').matches
// Main environment variables
const ENV = Object.freeze({
@@ -19,8 +19,8 @@ const ENV = Object.freeze({
IS_DEV: NODE_ENV === 'development',
// Device
IS_DESKTOP,
IS_MOBILE: !IS_DESKTOP,
IS_MOBILE,
IS_DESKTOP: !IS_MOBILE,
})
// Main CSS classes used within the project