i'm confused honestly, again and even more than before

This commit is contained in:
2025-04-22 05:07:11 +02:00
parent 647d1ff38a
commit 831b9f864b

View File

@@ -1,7 +1,7 @@
'use client'
import { type QueryClient, QueryClientProvider } from '@tanstack/react-query'
import { httpBatchStreamLink, loggerLink } from '@trpc/client'
import { httpBatchLink, httpBatchStreamLink, loggerLink } from '@trpc/client'
import { createTRPCReact } from '@trpc/react-query'
import type { inferRouterInputs, inferRouterOutputs } from '@trpc/server'
import { useState } from 'react'
@@ -49,7 +49,7 @@ export function TRPCReactProvider(props: { children: React.ReactNode }) {
process.env.NODE_ENV === 'development' ||
(op.direction === 'down' && op.result instanceof Error),
}),
httpBatchStreamLink({
httpBatchLink({
transformer: SuperJSON,
url: `${getBaseUrl()}/api/trpc`,
headers: () => {
@@ -57,12 +57,6 @@ export function TRPCReactProvider(props: { children: React.ReactNode }) {
headers.set('x-trpc-source', 'nextjs-react')
return headers
},
fetch: (url, options) => {
return fetch(url, {
...options,
keepalive: true,
})
},
}),
],
})