From 5c03dd4775845c559a1f6298f7577609ba907bb1 Mon Sep 17 00:00:00 2001
From: Nate Sesti <sestinj@gmail.com>
Date: Wed, 5 Jul 2023 23:49:37 -0700
Subject: ui overhaul

---
 extension/react-app/src/App.tsx | 39 ++++++++++++++++++++++-----------------
 1 file changed, 22 insertions(+), 17 deletions(-)

(limited to 'extension/react-app/src/App.tsx')

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>
   );
 }
 
-- 
cgit v1.2.3-70-g09d2

