From 2a49e8bae2556857a3d26f111d089b900349ed89 Mon Sep 17 00:00:00 2001 From: hasan-deriv Date: Mon, 15 Apr 2024 16:39:45 +0800 Subject: [PATCH] Revert "chore: test react-device-detect package" This reverts commit 397a006d9e206e487e598b85dcf1439eef8df91c. --- packages/shared/package.json | 3 +-- packages/shared/src/utils/os/os_detect.ts | 4 ---- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/packages/shared/package.json b/packages/shared/package.json index e0852a00c10c..1f51c578b8e8 100644 --- a/packages/shared/package.json +++ b/packages/shared/package.json @@ -56,7 +56,6 @@ "moment": "^2.29.2", "object.fromentries": "^2.0.0", "react": "^17.0.2", - "react-loadable": "^5.5.0", - "react-device-detect": "2.2.3" + "react-loadable": "^5.5.0" } } diff --git a/packages/shared/src/utils/os/os_detect.ts b/packages/shared/src/utils/os/os_detect.ts index 927e4d139a0a..c2cdb1dd2d31 100644 --- a/packages/shared/src/utils/os/os_detect.ts +++ b/packages/shared/src/utils/os/os_detect.ts @@ -1,5 +1,3 @@ -import { mobileVendor } from 'react-device-detect'; - declare global { interface Window { opera?: string; @@ -82,8 +80,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 =