From 647edc40240616bb07af0d6356a08eae2d628f23 Mon Sep 17 00:00:00 2001 From: Stephen Zhou <38493346+hyoban@users.noreply.github.com> Date: Mon, 23 Mar 2026 16:49:28 +0800 Subject: [PATCH] tweaks --- web/app/components/lazy-sentry-initializer.tsx | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/web/app/components/lazy-sentry-initializer.tsx b/web/app/components/lazy-sentry-initializer.tsx index 8cdc63f439..8c29ca4f9a 100644 --- a/web/app/components/lazy-sentry-initializer.tsx +++ b/web/app/components/lazy-sentry-initializer.tsx @@ -1,9 +1,16 @@ 'use client' +import { IS_DEV } from '@/config' +import { env } from '@/env' import dynamic from '@/next/dynamic' const SentryInitializer = dynamic(() => import('./sentry-initializer'), { ssr: false }) -const LazySentryInitializer = () => +const LazySentryInitializer = () => { + if (IS_DEV || !env.NEXT_PUBLIC_SENTRY_DSN) + return null + + return +} export default LazySentryInitializer