feat: wire web app infrastructure

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
tao.chen
2026-07-02 17:23:48 +08:00
co-authored by Claude
parent 27503781fa
commit 593d2aee5e
9 changed files with 230 additions and 6 deletions
+29
View File
@@ -0,0 +1,29 @@
import { useState } from "react";
import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
import { RouterProvider } from "react-router";
import { router } from "@/app/router";
import { AppErrorBoundary } from "@/app/AppErrorBoundary";
export function AppProviders() {
const [queryClient] = useState(
() =>
new QueryClient({
defaultOptions: {
queries: {
staleTime: 60_000,
retry: 1,
refetchOnWindowFocus: false,
},
},
}),
);
return (
<AppErrorBoundary>
<QueryClientProvider client={queryClient}>
<RouterProvider router={router} />
</QueryClientProvider>
</AppErrorBoundary>
);
}