Skip to content

Commit

Permalink
[UI v2] feat: Adds tanstack query dev tools for development mode
Browse files Browse the repository at this point in the history
  • Loading branch information
devinvillarosa committed Nov 27, 2024
1 parent 3da0f05 commit 3fc6253
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 7 deletions.
44 changes: 37 additions & 7 deletions ui-v2/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions ui-v2/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
"@radix-ui/react-toast": "^1.2.2",
"@radix-ui/react-tooltip": "^1.1.3",
"@tanstack/react-query": "^5.56.2",
"@tanstack/react-query-devtools": "^5.61.5",
"@tanstack/react-table": "^8.20.5",
"@tanstack/router-zod-adapter": "^1.58.16",
"@uiw/react-codemirror": "^4.23.6",
Expand Down
2 changes: 2 additions & 0 deletions ui-v2/src/app.tsx
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
import { RouterProvider } from "@tanstack/react-router";
import { queryClient, router } from "./router";
import { QueryClientProvider } from "@tanstack/react-query";
import { ReactQueryDevtools } from "@tanstack/react-query-devtools";

export const App = () => {
return (
<QueryClientProvider client={queryClient}>
<RouterProvider router={router} />
<ReactQueryDevtools />
</QueryClientProvider>
);
};
5 changes: 5 additions & 0 deletions ui-v2/tests/setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,8 @@ Object.defineProperty(window, "matchMedia", {
vi.mock("@tanstack/router-devtools", () => ({
TanStackRouterDevtools: () => null,
}));

// Mock @tanstack/react-query-devtools
vi.mock("@tanstack/react-query-devtool", () => ({
ReactQueryDevtools: () => null,
}));

0 comments on commit 3fc6253

Please sign in to comment.