summaryrefslogtreecommitdiff
path: root/extension/react-app/src/App.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'extension/react-app/src/App.tsx')
-rw-r--r--extension/react-app/src/App.tsx39
1 files changed, 22 insertions, 17 deletions
diff --git a/extension/react-app/src/App.tsx b/extension/react-app/src/App.tsx
index a51541d0..8785f88f 100644
--- a/extension/react-app/src/App.tsx
+++ b/extension/react-app/src/App.tsx
@@ -1,28 +1,33 @@
import DebugPanel from "./components/DebugPanel";
import MainTab from "./tabs/main";
-import { Provider } from "react-redux";
-import store from "./redux/store";
import WelcomeTab from "./tabs/welcome";
import ChatTab from "./tabs/chat";
import GUI from "./tabs/gui";
+import { createContext } from "react";
+import useContinueGUIProtocol from "./hooks/useWebsocket";
+import ContinueGUIClientProtocol from "./hooks/useContinueGUIProtocol";
+
+export const GUIClientContext = createContext<
+ ContinueGUIClientProtocol | undefined
+>(undefined);
function App() {
+ const client = useContinueGUIProtocol();
+
return (
- <>
- <Provider store={store}>
- <DebugPanel
- tabs={[
- {
- element: <GUI />,
- title: "GUI",
- },
- // { element: <MainTab />, title: "Debug Panel" },
- // { element: <WelcomeTab />, title: "Welcome" },
- // { element: <ChatTab />, title: "Chat" },
- ]}
- ></DebugPanel>
- </Provider>
- </>
+ <GUIClientContext.Provider value={client}>
+ <DebugPanel
+ tabs={[
+ {
+ element: <GUI />,
+ title: "GUI",
+ },
+ // { element: <MainTab />, title: "Debug Panel" },
+ // { element: <WelcomeTab />, title: "Welcome" },
+ // { element: <ChatTab />, title: "Chat" },
+ ]}
+ />
+ </GUIClientContext.Provider>
);
}