Skip to content

Commit

Permalink
Remove WithAddDebugFieldsToWindow from providers and add to page if e…
Browse files Browse the repository at this point in the history
…nv is development
  • Loading branch information
FreePhoenix888 committed Sep 26, 2023
1 parent 2779f00 commit b68995e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
8 changes: 7 additions & 1 deletion src/react/components/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -43,7 +44,12 @@ export function Page({ renderChildren }: PageParam) {
</VStack>
)}
>
{renderChildren({ deep })}
<>
{renderChildren({ deep })}
{
process.env.NODE_ENV === 'development' && <WithAddDebugFieldsToWindow />
}
</>
</WithPackagesInstalled>
);
}}
Expand Down
2 changes: 0 additions & 2 deletions src/react/components/with-providers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,7 @@ export function WithProviders({ children }: { children: JSX.Element }) {
}}
>
<DeepProvider>
<WithAddDebugFieldsToWindow>
{children}
</WithAddDebugFieldsToWindow>
</DeepProvider>
</ApolloClientTokenizedProvider>
)}
Expand Down

0 comments on commit b68995e

Please sign in to comment.