summaryrefslogtreecommitdiff
path: root/extension/react-app/src/App.tsx
diff options
context:
space:
mode:
authorNate Sesti <sestinj@gmail.com>2023-07-05 23:49:37 -0700
committerNate Sesti <sestinj@gmail.com>2023-07-05 23:49:37 -0700
commit5c03dd4775845c559a1f6298f7577609ba907bb1 (patch)
treee3767487c3714191a9f67b6c6f8879fa08c75830 /extension/react-app/src/App.tsx
parentd259979ef89f17957396fc7300e1ecf54214ae84 (diff)
downloadsncontinue-5c03dd4775845c559a1f6298f7577609ba907bb1.tar.gz
sncontinue-5c03dd4775845c559a1f6298f7577609ba907bb1.tar.bz2
sncontinue-5c03dd4775845c559a1f6298f7577609ba907bb1.zip
ui overhaul
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>
);
}