-
Notifications
You must be signed in to change notification settings - Fork 4
/
App.tsx
37 lines (33 loc) · 965 Bytes
/
App.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
35
36
37
import { QueryClientProvider } from "@tanstack/react-query";
import { RouterProvider } from "@tanstack/react-router";
import { TanStackReactQueryDevelopmentTools } from "../components/developmentTools";
import { ThemeProvider, Toaster, TooltipProvider } from "../components/ui";
import { AuthProvider, useAuth } from "./auth";
import { queryClient, router } from "./router";
const Router = () => {
const auth = useAuth();
return (
<RouterProvider
router={router}
context={{ queryClient, auth }}
/>
);
};
export const App = () => {
return (
<QueryClientProvider client={queryClient}>
<TanStackReactQueryDevelopmentTools
initialIsOpen={false}
buttonPosition="bottom-right"
/>
<ThemeProvider>
<Toaster />
<TooltipProvider>
<AuthProvider>
<Router />
</AuthProvider>
</TooltipProvider>
</ThemeProvider>
</QueryClientProvider>
);
};