From 4e8e8ae2d4633d71d2fd37ae1b15d26c7a9f50ab Mon Sep 17 00:00:00 2001 From: Anton Shepilov Date: Wed, 28 Jun 2023 11:44:53 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20remove=20redirect=20to=20the=20m?= =?UTF-8?q?obile=20app=20(#132)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/app/components/mobile-redirect/index.tsx | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/tdrive/frontend/src/app/components/mobile-redirect/index.tsx b/tdrive/frontend/src/app/components/mobile-redirect/index.tsx index c9ba0f9b..83e21886 100644 --- a/tdrive/frontend/src/app/components/mobile-redirect/index.tsx +++ b/tdrive/frontend/src/app/components/mobile-redirect/index.tsx @@ -14,7 +14,7 @@ type SearchParamsType = { }; export default function MobileRedirect(props: { children: ReactNode }) { - const os = getDevice(); + const os = "other"; const searchParams: SearchParamsType = Object.fromEntries( new URLSearchParams(window.location.search), ); @@ -22,7 +22,7 @@ export default function MobileRedirect(props: { children: ReactNode }) { const parameters = InitService.server_infos?.configuration.mobile; const getapp = searchParams.getapp; - let forceUseWeb: string | boolean = searchParams.useweb; + let forceUseWeb: string | boolean = true; const originInUrl = searchParams.origin; delete searchParams.useweb; @@ -39,11 +39,11 @@ export default function MobileRedirect(props: { children: ReactNode }) { //If requested in url: redirect to stores if (getapp && parameters?.mobile_appstore && parameters?.mobile_googleplay) { - if (os === 'android') { - document.location.replace(parameters?.mobile_googleplay); - } else if (os === 'ios') { - document.location.replace(parameters?.mobile_appstore); - } + // if (os === 'android') { + // document.location.replace(parameters?.mobile_googleplay); + // } else if (os === 'ios') { + // document.location.replace(parameters?.mobile_appstore); + // } return <>; }