🐛 Fix 404 error page
Wasn't working because of ssr prop from trpc
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import { httpBatchLink } from '@trpc/client'
|
||||
import { httpBatchLink, loggerLink } from '@trpc/client'
|
||||
import { createTRPCNext } from '@trpc/next'
|
||||
import type { AppRouter } from '../utils/server/routers/v1/trpcRouter'
|
||||
import superjson from 'superjson'
|
||||
@@ -10,6 +10,11 @@ export const trpc = createTRPCNext<AppRouter>({
|
||||
config() {
|
||||
return {
|
||||
links: [
|
||||
loggerLink({
|
||||
enabled: (opts) =>
|
||||
process.env.NODE_ENV === 'development' ||
|
||||
(opts.direction === 'down' && opts.result instanceof Error),
|
||||
}),
|
||||
httpBatchLink({
|
||||
url: `${getBaseUrl()}/api/trpc`,
|
||||
}),
|
||||
@@ -17,5 +22,5 @@ export const trpc = createTRPCNext<AppRouter>({
|
||||
transformer: superjson,
|
||||
}
|
||||
},
|
||||
ssr: true,
|
||||
ssr: false,
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user