Skip to content

armgit / Cap

Public Imported from GitHub
0

Open source Loom alternative. Beautiful, shareable screen recordings.

feat(web): add QueryProvider for lightweight client queries

Richie McIlroy31af33dbfaa5
diff --git a/apps/web/app/Layout/QueryProvider.tsx b/apps/web/app/Layout/QueryProvider.tsx
new file mode 100644
index 000000000..ac0fb664f
--- /dev/null
+++ b/apps/web/app/Layout/QueryProvider.tsx
@@ -0,0 +1,12 @@
+"use client";
+
+import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
+import { useState } from "react";
+
+export function QueryProvider({ children }: { children: React.ReactNode }) {
+ const [queryClient] = useState(() => new QueryClient());
+
+ return (
+ <QueryClientProvider client={queryClient}>{children}</QueryClientProvider>
+ );
+}