diff --git a/package.json b/package.json index 8d117ea9..a19b2fb8 100644 --- a/package.json +++ b/package.json @@ -19,6 +19,7 @@ ] }, "dependencies": { + "@dwelle/tunnel-rat": "0.1.1", "@sentry/browser": "6.2.5", "@sentry/integrations": "6.2.5", "@testing-library/jest-dom": "5.16.2", diff --git a/src/components/LayerUI.tsx b/src/components/LayerUI.tsx index 380c01c1..16151200 100644 --- a/src/components/LayerUI.tsx +++ b/src/components/LayerUI.tsx @@ -40,17 +40,12 @@ import { actionToggleStats } from "../actions/actionToggleStats"; import Footer from "./footer/Footer"; import { hostSidebarCountersAtom } from "./Sidebar/Sidebar"; import { jotaiScope } from "../jotai"; -import { useAtom } from "jotai"; +import { Provider, useAtom } from "jotai"; import MainMenu from "./main-menu/MainMenu"; import { ActiveConfirmDialog } from "./ActiveConfirmDialog"; import { HandButton } from "./HandButton"; import { isHandToolActive } from "../appState"; -import { - mainMenuTunnel, - welcomeScreenMenuHintTunnel, - welcomeScreenToolbarHintTunnel, - welcomeScreenCenterTunnel, -} from "./tunnels"; +import { TunnelsContext, useInitializeTunnels } from "./context/tunnels"; interface LayerUIProps { actionManager: ActionManager; @@ -130,6 +125,8 @@ const LayerUI = ({ }: LayerUIProps) => { const device = useDevice(); + const tunnels = useInitializeTunnels(); + const renderJSONExportDialog = () => { if (!UIOptions.canvasActions.export) { return null; @@ -201,8 +198,8 @@ const LayerUI = ({
{/* wrapping to Fragment stops React from occasionally complaining about identical Keys */} - - {renderWelcomeScreen && } + + {renderWelcomeScreen && }
); @@ -254,7 +251,7 @@ const LayerUI = ({ {(heading: React.ReactNode) => (
{renderWelcomeScreen && ( - + )} {/* ------------------------- tunneled UI ---------------------------- */} {/* make sure we render host app components first so that we can detect @@ -434,7 +431,7 @@ const LayerUI = ({ : {} } > - {renderWelcomeScreen && } + {renderWelcomeScreen && } {renderFixedSideContainer()}