From a71712abe2969943057fd6af5f3e1db26713c25b Mon Sep 17 00:00:00 2001 From: hasan-deriv Date: Mon, 15 Apr 2024 13:14:31 +0800 Subject: [PATCH] chore: test react-device-detect package --- packages/shared/src/utils/os/os_detect.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/shared/src/utils/os/os_detect.ts b/packages/shared/src/utils/os/os_detect.ts index 927e4d139a0a..57f634adeea9 100644 --- a/packages/shared/src/utils/os/os_detect.ts +++ b/packages/shared/src/utils/os/os_detect.ts @@ -82,8 +82,6 @@ export const OSDetect = () => { }; export const mobileOSDetect = () => { - // eslint-disable-next-line no-console - console.log('==>', mobileVendor); const userAgent = navigator.userAgent || navigator.vendor || window.opera || ''; // huawei devices regex from: https://gist.github.com/megaacheyounes/e1c7eec5c790e577db602381b8c50bfa const huaweiDevicesRegex = @@ -111,6 +109,8 @@ export const mobileOSDetect = () => { }; export const mobileOSDetectAsync = async () => { + // eslint-disable-next-line no-console + console.log('==>', { mobileVendor }); const userAgent = navigator.userAgent || navigator.vendor || window.opera || ''; const huaweiDevicesRegex = /\b(ALP-|AMN-|ANA-|ANE-|ANG-|AQM-|ARS-|ART-|ATU-|BAC-|BLA-|BRQ-|CAG-|CAM-|CAN-|CAZ-|CDL-|CDY-|CLT-|CRO-|CUN-|DIG-|DRA-|DUA-|DUB-|DVC-|ELE-|ELS-|EML-|EVA-|EVR-|FIG-|FLA-|FRL-|GLK-|HMA-|HW-|HWI-|INE-|JAT-|JEF-|JER-|JKM-|JNY-|JSC-|LDN-|LIO-|LON-|LUA-|LYA-|LYO-|MAR-|MED-|MHA-|MLA-|MRD-|MYA-|NCE-|NEO-|NOH-|NOP-|OCE-|PAR-|PIC-|POT-|PPA-|PRA-|RNE-|SEA-|SLA-|SNE-|SPN-|STK-|TAH-|TAS-|TET-|TRT-|VCE-|VIE-|VKY-|VNS-|VOG-|VTR-|WAS-|WKG-|WLZ-|JAD-|MLD-|RTE-|NAM-|NEN-|BAL-|JLN-|YAL|MGA-|FGD-|XYAO-|BON-|ALN-|ALT-|BRA-|DBY2-|STG-|MAO-|LEM-|GOA-|FOA-|MNA-|LNA-)\b/i;