From 1a6fac2a50f242a4659a3f325b37956a682c0747 Mon Sep 17 00:00:00 2001 From: Lorenzo Blasa Date: Wed, 17 May 2023 03:50:40 -0700 Subject: [PATCH] Only show PWA wizard in production Summary: ^ Reviewed By: antonk52 Differential Revision: D45942615 fbshipit-source-id: e759da943396d85cd68169f79818d7037f5a940b --- .../flipper-ui-core/src/chrome/PWAppInstallationWizard.tsx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/desktop/flipper-ui-core/src/chrome/PWAppInstallationWizard.tsx b/desktop/flipper-ui-core/src/chrome/PWAppInstallationWizard.tsx index a51d276f3..4179af89a 100644 --- a/desktop/flipper-ui-core/src/chrome/PWAppInstallationWizard.tsx +++ b/desktop/flipper-ui-core/src/chrome/PWAppInstallationWizard.tsx @@ -10,6 +10,7 @@ import React from 'react'; import {Modal, Button} from 'antd'; import {getFlipperLib, Layout, _NuxManagerContext} from 'flipper-plugin'; +import isProduction from '../utils/isProduction'; type Props = { onHide: () => void; @@ -39,6 +40,10 @@ const tracker = new PWAWizardTracker(); const lastShownTimestampKey = 'flipper-pwa-wizard-last-shown-timestamp'; export function shouldShowPWAInstallationWizard(): boolean { + if (!isProduction()) { + return false; + } + if (window.matchMedia('(display-mode: standalone)').matches) { tracker.track('pwa-installation-wizard-should-show', { show: false,