mirror of
https://github.com/ershisan99/www.git
synced 2026-01-03 12:35:24 +00:00
i'm confused honestly, again and even more than before
This commit is contained in:
@@ -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,
|
||||
})
|
||||
},
|
||||
}),
|
||||
],
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user