mirror of
https://github.com/ershisan99/www.git
synced 2026-01-29 05:22:04 +00:00
i'm confused honestly, again and even more than before
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
'use client'
|
'use client'
|
||||||
|
|
||||||
import { type QueryClient, QueryClientProvider } from '@tanstack/react-query'
|
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 { createTRPCReact } from '@trpc/react-query'
|
||||||
import type { inferRouterInputs, inferRouterOutputs } from '@trpc/server'
|
import type { inferRouterInputs, inferRouterOutputs } from '@trpc/server'
|
||||||
import { useState } from 'react'
|
import { useState } from 'react'
|
||||||
@@ -49,7 +49,7 @@ export function TRPCReactProvider(props: { children: React.ReactNode }) {
|
|||||||
process.env.NODE_ENV === 'development' ||
|
process.env.NODE_ENV === 'development' ||
|
||||||
(op.direction === 'down' && op.result instanceof Error),
|
(op.direction === 'down' && op.result instanceof Error),
|
||||||
}),
|
}),
|
||||||
httpBatchStreamLink({
|
httpBatchLink({
|
||||||
transformer: SuperJSON,
|
transformer: SuperJSON,
|
||||||
url: `${getBaseUrl()}/api/trpc`,
|
url: `${getBaseUrl()}/api/trpc`,
|
||||||
headers: () => {
|
headers: () => {
|
||||||
@@ -57,12 +57,6 @@ export function TRPCReactProvider(props: { children: React.ReactNode }) {
|
|||||||
headers.set('x-trpc-source', 'nextjs-react')
|
headers.set('x-trpc-source', 'nextjs-react')
|
||||||
return headers
|
return headers
|
||||||
},
|
},
|
||||||
fetch: (url, options) => {
|
|
||||||
return fetch(url, {
|
|
||||||
...options,
|
|
||||||
keepalive: true,
|
|
||||||
})
|
|
||||||
},
|
|
||||||
}),
|
}),
|
||||||
],
|
],
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user