Skip to content

✨ Innovative and open-source visualization application that transforms various data formats, such as JSON, YAML, XML and CSV into interactive graphs.

disable pwa on web

AykutSarac0e3fad4b5437
diff --git a/src/pages/_app.tsx b/src/pages/_app.tsx
index 9c9ed4e5..66a813e7 100644
--- a/src/pages/_app.tsx
+++ b/src/pages/_app.tsx
@@ -8,6 +8,7 @@ import GlobalStyle from "src/constants/globalStyle";
import { darkTheme, lightTheme } from "src/constants/theme";
import { useConfig, withConfig } from "src/hocs/config";
import { GoogleAnalytics } from "src/components/GoogleAnalytics";
+import Script from "next/script";
if (process.env.NODE_ENV !== "development") {
Sentry.init({
@@ -19,6 +20,21 @@ if (process.env.NODE_ENV !== "development") {
function JsonVisio({ Component, pageProps }: AppProps) {
const { settings } = useConfig();
+ React.useEffect(() => {
+ if (!window.matchMedia("(display-mode: standalone)").matches) {
+ navigator.serviceWorker
+ .getRegistrations()
+ .then(function (registrations) {
+ for (let registration of registrations) {
+ registration.unregister();
+ }
+ })
+ .catch(function (err) {
+ console.log("Service Worker registration failed: ", err);
+ });
+ }
+ }, []);
+
return (
<>
<GoogleAnalytics />