Only show PWA wizard in production
Summary: ^ Reviewed By: antonk52 Differential Revision: D45942615 fbshipit-source-id: e759da943396d85cd68169f79818d7037f5a940b
This commit is contained in:
committed by
Facebook GitHub Bot
parent
6f36108ca2
commit
1a6fac2a50
@@ -10,6 +10,7 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import {Modal, Button} from 'antd';
|
import {Modal, Button} from 'antd';
|
||||||
import {getFlipperLib, Layout, _NuxManagerContext} from 'flipper-plugin';
|
import {getFlipperLib, Layout, _NuxManagerContext} from 'flipper-plugin';
|
||||||
|
import isProduction from '../utils/isProduction';
|
||||||
|
|
||||||
type Props = {
|
type Props = {
|
||||||
onHide: () => void;
|
onHide: () => void;
|
||||||
@@ -39,6 +40,10 @@ const tracker = new PWAWizardTracker();
|
|||||||
|
|
||||||
const lastShownTimestampKey = 'flipper-pwa-wizard-last-shown-timestamp';
|
const lastShownTimestampKey = 'flipper-pwa-wizard-last-shown-timestamp';
|
||||||
export function shouldShowPWAInstallationWizard(): boolean {
|
export function shouldShowPWAInstallationWizard(): boolean {
|
||||||
|
if (!isProduction()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
if (window.matchMedia('(display-mode: standalone)').matches) {
|
if (window.matchMedia('(display-mode: standalone)').matches) {
|
||||||
tracker.track('pwa-installation-wizard-should-show', {
|
tracker.track('pwa-installation-wizard-should-show', {
|
||||||
show: false,
|
show: false,
|
||||||
|
|||||||
Reference in New Issue
Block a user