-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathmain.tsx
34 lines (32 loc) · 1.08 KB
/
main.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
import { StrictMode } from "react";
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";
// Initialize the API client
client.setConfig({
baseUrl: import.meta.env.VITE_BASE_API_URL,
});
createRoot(document.getElementById("root")!).render(
<StrictMode>
<BrowserRouter>
<DarkModeProvider>
<SidebarProvider>
<ErrorBoundary fallback={<Error />}>
<QueryClientProvider>
<Toaster />
<App />
</QueryClientProvider>
</ErrorBoundary>
</SidebarProvider>
</DarkModeProvider>
</BrowserRouter>
</StrictMode>,
);