diff --git a/app/react-query.provider.tsx b/app/react-query.provider.tsx index 37daca7fd..390d355fc 100644 --- a/app/react-query.provider.tsx +++ b/app/react-query.provider.tsx @@ -1,8 +1,10 @@ 'use client' +import { isDev } from '@/lib/config/app.config' import { captureError } from '@/lib/shared/utils/errors' import { SentryMetadata, captureSentryError, shouldIgnore } from '@/lib/shared/utils/query-errors' import { QueryCache, QueryClient, QueryClientProvider } from '@tanstack/react-query' +import { ReactQueryDevtools } from '@tanstack/react-query-devtools' import { ReactNode } from 'react' export const queryClient = new QueryClient({ @@ -38,5 +40,11 @@ queryClient.setDefaultOptions({ }) export function ReactQueryClientProvider({ children }: { children: ReactNode | ReactNode[] }) { - return {children} + const shouldShowReactQueryDevtools = false + return ( + + {children} + {isDev && shouldShowReactQueryDevtools && } + + ) } diff --git a/package.json b/package.json index ff175e128..e99f4a582 100644 --- a/package.json +++ b/package.json @@ -50,6 +50,7 @@ "@sentry/nextjs": "^8.13.0", "@studio-freight/react-lenis": "^0.0.47", "@tanstack/react-query": "^5.29.2", + "@tanstack/react-query-devtools": "^5.56.0", "@tanstack/react-table": "^8.9.3", "@vercel/speed-insights": "^1.0.1", "bignumber.js": "^9.1.2", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 76fb0d600..fda623896 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -59,6 +59,9 @@ importers: '@tanstack/react-query': specifier: ^5.29.2 version: 5.29.2(react@18.2.0) + '@tanstack/react-query-devtools': + specifier: ^5.56.0 + version: 5.56.0(@tanstack/react-query@5.29.2(react@18.2.0))(react@18.2.0) '@tanstack/react-table': specifier: ^8.9.3 version: 8.10.7(react-dom@18.2.0(react@18.2.0))(react@18.2.0) @@ -3667,6 +3670,15 @@ packages: '@tanstack/query-core@5.29.0': resolution: {integrity: sha512-WgPTRs58hm9CMzEr5jpISe8HXa3qKQ8CxewdYZeVnA54JrPY9B1CZiwsCoLpLkf0dGRZq+LcX5OiJb0bEsOFww==} + '@tanstack/query-devtools@5.55.1': + resolution: {integrity: sha512-2g0TWQGlkyHs9maHIU5A7lRunG4Rj3Y5lOEenE+fydE4zk7GqRs7rKJBp7F74iqRo/cA9V6t1YYQWqd6YRBmcQ==} + + '@tanstack/react-query-devtools@5.56.0': + resolution: {integrity: sha512-fRwUF+WlFlZFlyPDO/MXY39sjp3KaIhdHc5t+8VKEBlxIQ36jZpFWqtxdMxjlH2/u3TxV8UJ0As2knkxUsv4ag==} + peerDependencies: + '@tanstack/react-query': ^5.56.0 + react: ^18 || ^19 + '@tanstack/react-query@5.29.2': resolution: {integrity: sha512-nyuWILR4u7H5moLGSiifLh8kIqQDLNOHGuSz0rcp+J75fNc8aQLyr5+I2JCHU3n+nJrTTW1ssgAD8HiKD7IFBQ==} peerDependencies: @@ -13743,6 +13755,14 @@ snapshots: '@tanstack/query-core@5.29.0': {} + '@tanstack/query-devtools@5.55.1': {} + + '@tanstack/react-query-devtools@5.56.0(@tanstack/react-query@5.29.2(react@18.2.0))(react@18.2.0)': + dependencies: + '@tanstack/query-devtools': 5.55.1 + '@tanstack/react-query': 5.29.2(react@18.2.0) + react: 18.2.0 + '@tanstack/react-query@5.29.2(react@18.2.0)': dependencies: '@tanstack/query-core': 5.29.0