From 0d93e16f3a0b3d9a28713eee6a39fd3636ab3527 Mon Sep 17 00:00:00 2001 From: daniyal Date: Sat, 4 Jan 2025 11:33:44 +0500 Subject: [PATCH] chore: enable debug logs only in dev mode --- src/contexts/NDKContext.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/contexts/NDKContext.tsx b/src/contexts/NDKContext.tsx index 55100e8..ba1d734 100644 --- a/src/contexts/NDKContext.tsx +++ b/src/contexts/NDKContext.tsx @@ -75,7 +75,9 @@ export const NDKContextProvider = ({ children }: { children: ReactNode }) => { }, []) const ndk = useMemo(() => { - // localStorage.setItem('debug', '*') + if (import.meta.env.MODE === 'development') { + localStorage.setItem('debug', '*') + } const dexieAdapter = new NDKCacheAdapterDexie({ dbName: 'sigit-db' }) dexieAdapter.locking = true const ndk = new NDK({