fix: make tunnels work in multi-instance scenarios (#6178)

* fix: make tunnels work in multi-instance scenarios

* factor tunnels out

* use tunnel-rat fork until upsteam updated
This commit is contained in:
David Luzar 2023-02-01 06:16:17 +01:00 committed by GitHub
parent e6de1fe4a4
commit 7562d9b533
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
12 changed files with 76 additions and 32 deletions

View file

@ -13,7 +13,7 @@ import { t } from "../../i18n";
import { HamburgerMenuIcon } from "../icons";
import { withInternalFallback } from "../hoc/withInternalFallback";
import { composeEventHandlers } from "../../utils";
import { mainMenuTunnel } from "../tunnels";
import { useTunnels } from "../context/tunnels";
const MainMenu = Object.assign(
withInternalFallback(
@ -28,6 +28,7 @@ const MainMenu = Object.assign(
*/
onSelect?: (event: Event) => void;
}) => {
const { mainMenuTunnel } = useTunnels();
const device = useDevice();
const appState = useExcalidrawAppState();
const setAppState = useExcalidrawSetAppState();