Skip to content

Commit 46a4903

Browse files
committed
chore: remove unused Provider function from tanstack-query template (#272)
1 parent 2cf6703 commit 46a4903

File tree

2 files changed

+6
-29
lines changed

2 files changed

+6
-29
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@tanstack/create': patch
3+
---
4+
5+
chore: remove unused Provider function from tanstack-query root-provider template

packages/create/src/frameworks/react/add-ons/tanstack-query/assets/src/integrations/tanstack-query/root-provider.tsx.ejs

Lines changed: 1 addition & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@ import { createTRPCOptionsProxy } from "@trpc/tanstack-react-query";
66
77
import type { TRPCRouter } from "@/integrations/trpc/router";
88
9-
import { TRPCProvider } from "@/integrations/trpc/react";
10-
119
function getUrl() {
1210
const base = (() => {
1311
if (typeof window !== "undefined") return "";
@@ -42,39 +40,13 @@ export function getContext() {
4240
trpc: serverHelpers,
4341
};
4442
}
45-
46-
export function Provider({
47-
children,
48-
queryClient,
49-
}: {
50-
children: React.ReactNode;
51-
queryClient: QueryClient;
52-
}) {
53-
return (
54-
<TRPCProvider trpcClient={trpcClient} queryClient={queryClient}>
55-
{children}
56-
</TRPCProvider>
57-
);
58-
}
5943
<% } else { %>
60-
import { QueryClient, QueryClientProvider } from '@tanstack/react-query'
44+
import { QueryClient } from '@tanstack/react-query'
6145
6246
export function getContext() {
6347
const queryClient = new QueryClient();
6448
return {
6549
queryClient,
6650
};
6751
}
68-
69-
export function Provider({
70-
children,
71-
queryClient,
72-
}: {
73-
children: React.ReactNode;
74-
queryClient: QueryClient;
75-
}) {
76-
return (
77-
<QueryClientProvider client={queryClient}>{children}</QueryClientProvider>
78-
);
79-
}
8052
<% } %>

0 commit comments

Comments
 (0)