Only show PWA wizard in production

Summary: ^

Reviewed By: antonk52

Differential Revision: D45942615

fbshipit-source-id: e759da943396d85cd68169f79818d7037f5a940b
This commit is contained in:
Lorenzo Blasa
2023-05-17 03:50:40 -07:00
committed by Facebook GitHub Bot
parent 6f36108ca2
commit 1a6fac2a50

View File

@@ -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,