feat(client): setup tanstack query and axios

Signed-off-by: Noa Virellia <noa@requiem.garden>
This commit is contained in:
2025-12-19 16:25:43 +08:00
parent adbad1c365
commit cb46eb4a60
6 changed files with 88 additions and 2 deletions

View File

@@ -1,13 +1,18 @@
import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
import { createRootRoute, Outlet } from '@tanstack/react-router';
import { TanStackRouterDevtools } from '@tanstack/react-router-devtools';
import { ThemeProvider } from '@/components/theme-provider';
import '@/index.css';
const queryClient = new QueryClient();
function RootLayout() {
return (
<>
<ThemeProvider defaultTheme="dark" storageKey="vite-ui-theme">
<Outlet />
<QueryClientProvider client={queryClient}>
<Outlet />
</QueryClientProvider>
</ThemeProvider>
<TanStackRouterDevtools />
</>