We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5e2a587 commit 49ede0fCopy full SHA for 49ede0f
src/lib/trpc/TrpcProvider.tsx
@@ -18,6 +18,9 @@ const getBaseUrl = () => {
18
return env.NEXT_PUBLIC_BASE_URL;
19
};
20
21
+const networkMode =
22
+ env.NEXT_PUBLIC_NODE_ENV !== 'production' ? 'always' : undefined;
23
+
24
export function TrpcProvider(props: { children: React.ReactNode }) {
25
const [showDemo, setShowDemo] = useState(false);
26
@@ -26,8 +29,10 @@ export function TrpcProvider(props: { children: React.ReactNode }) {
29
new QueryClient({
27
30
defaultOptions: {
28
31
queries: {
- networkMode:
- env.NEXT_PUBLIC_NODE_ENV !== 'production' ? 'always' : undefined,
32
+ networkMode,
33
+ },
34
+ mutations: {
35
36
},
37
38
mutationCache: new MutationCache({
0 commit comments