瀏覽代碼

disable sentry for development

AykutSarac 2 年之前
父節點
當前提交
eac23526ca
共有 1 個文件被更改,包括 6 次插入4 次删除
  1. 6 4
      src/pages/_app.tsx

+ 6 - 4
src/pages/_app.tsx

@@ -9,10 +9,12 @@ import { darkTheme, lightTheme } from "src/constants/theme";
 import { useConfig, withConfig } from "src/hocs/config";
 import { GoogleAnalytics } from "src/components/GoogleAnalytics";
 
-Sentry.init({
-  dsn: "https://[email protected]/6495191",
-  tracesSampleRate: 0.5,
-});
+if (process.env.NODE_ENV !== "development") {
+  Sentry.init({
+    dsn: "https://[email protected]/6495191",
+    tracesSampleRate: 0.5,
+  });
+}
 
 function JsonVisio({ Component, pageProps }: AppProps) {
   const { settings } = useConfig();