From 57fa0208a7f600d627fffacd7adec77e1469860d Mon Sep 17 00:00:00 2001 From: Daniel Kantor Date: Tue, 21 Jan 2025 11:21:08 +0100 Subject: [PATCH] fix: fix providers for better debugging --- src/App.tsx | 23 ++++++++++++++--------- src/main.tsx | 10 +++++----- 2 files changed, 19 insertions(+), 14 deletions(-) diff --git a/src/App.tsx b/src/App.tsx index 14201770..fc50449a 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -4,24 +4,29 @@ import { usePromptsData } from "./hooks/usePromptsData"; import { Sidebar } from "./components/Sidebar"; import { useSse } from "./hooks/useSse"; import Page from "./Page"; +import { useHref, useNavigate } from "react-router-dom"; +import { RouterProvider } from "@stacklok/ui-kit"; function App() { const { data: prompts, isLoading } = usePromptsData(); + const navigate = useNavigate(); useSse(); return ( -
- - - -
-
+ +
+ + + +
+
-
- +
+ +
-
+
); } diff --git a/src/main.tsx b/src/main.tsx index 8ecc9112..22e8943c 100644 --- a/src/main.tsx +++ b/src/main.tsx @@ -3,13 +3,13 @@ import { createRoot } from "react-dom/client"; import "./index.css"; import "@stacklok/ui-kit/style"; import App from "./App.tsx"; -import { BrowserRouter } from "react-router-dom"; import { SidebarProvider } from "./components/ui/sidebar.tsx"; import ErrorBoundary from "./components/ErrorBoundary.tsx"; import { Error } from "./components/Error.tsx"; import { DarkModeProvider, Toaster } from "@stacklok/ui-kit"; import { client } from "./api/generated/index.ts"; import { QueryClientProvider } from "./components/react-query-provider.tsx"; +import { BrowserRouter } from "react-router-dom"; // Initialize the API client client.setConfig({ @@ -21,12 +21,12 @@ createRoot(document.getElementById("root")!).render( - }> - + + }> - - + +