From e5eff7d9ecd7a4f8f97f7c9df72da37a2daebabc Mon Sep 17 00:00:00 2001 From: Nate Kelley Date: Thu, 10 Jul 2025 15:50:56 -0600 Subject: [PATCH] panel options update --- apps/web/globals.d.ts | 1 + .../BusterReactQuery/BusterReactQueryAndApi.tsx | 15 +++++++++------ 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/apps/web/globals.d.ts b/apps/web/globals.d.ts index ccbbaaff1..9c980904b 100644 --- a/apps/web/globals.d.ts +++ b/apps/web/globals.d.ts @@ -85,6 +85,7 @@ declare global { POSTHOG_ENV_ID?: string; NEXT_PUBLIC_USER?: string; NEXT_PUBLIC_USER_PASSWORD?: string; + NEXT_ENABLE_TANSTACK_PANEL?: 'true' | 'false'; } } } diff --git a/apps/web/src/context/BusterReactQuery/BusterReactQueryAndApi.tsx b/apps/web/src/context/BusterReactQuery/BusterReactQueryAndApi.tsx index 69da445c2..3789d29f5 100644 --- a/apps/web/src/context/BusterReactQuery/BusterReactQueryAndApi.tsx +++ b/apps/web/src/context/BusterReactQuery/BusterReactQueryAndApi.tsx @@ -59,15 +59,18 @@ export const BusterReactQueryProvider = ({ children }: { children: React.ReactNo // }; // }, [checkTokenValidity]); - useHotkeys('meta+shift+i', (e) => { - e.preventDefault(); - e.stopPropagation(); - setIsDevToolsOpen((prev) => !prev); - }); + useHotkeys( + 'meta+shift+i', + (e) => { + e.preventDefault(); + e.stopPropagation(); + setIsDevToolsOpen((prev) => !prev); + }, + { enabled: process.env.NEXT_ENABLE_TANSTACK_PANEL === 'true' } + ); return ( - {/* {children} */} {children} {isDevToolsOpen && ( <>