From b68995e2a8563f4bb86fb72d6b062b1a2918556f Mon Sep 17 00:00:00 2001 From: FreePhoenix888 Date: Tue, 26 Sep 2023 15:41:54 +0600 Subject: [PATCH] Remove WithAddDebugFieldsToWindow from providers and add to page if env is development --- src/react/components/page.tsx | 8 +++++++- src/react/components/with-providers.tsx | 2 -- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/react/components/page.tsx b/src/react/components/page.tsx index a6d728d..fcc0218 100644 --- a/src/react/components/page.tsx +++ b/src/react/components/page.tsx @@ -11,6 +11,7 @@ import { } from "@deep-foundation/deeplinks/imports/client"; import { ErrorAlert } from "./error-alert"; import { WithLogin } from "./with-login"; +import { WithAddDebugFieldsToWindow } from "./with-add-debug-fields-to-window"; export interface PageParam { renderChildren: (param: { deep: DeepClient }) => JSX.Element; @@ -43,7 +44,12 @@ export function Page({ renderChildren }: PageParam) { )} > - {renderChildren({ deep })} + <> + {renderChildren({ deep })} + { + process.env.NODE_ENV === 'development' && + } + ); }} diff --git a/src/react/components/with-providers.tsx b/src/react/components/with-providers.tsx index da7ab72..6e1cb90 100644 --- a/src/react/components/with-providers.tsx +++ b/src/react/components/with-providers.tsx @@ -28,9 +28,7 @@ export function WithProviders({ children }: { children: JSX.Element }) { }} > - {children} - )}