feat: revalidate my pages breadcrumbs on demand
This commit is contained in:
committed by
Michael Zetterberg
parent
ba13a00b63
commit
0c4aa592cc
@@ -1,7 +1,7 @@
|
||||
"use client"
|
||||
|
||||
import { QueryClient, QueryClientProvider } from "@tanstack/react-query"
|
||||
import { httpBatchLink } from "@trpc/client"
|
||||
import { httpBatchLink, loggerLink } from "@trpc/client"
|
||||
import { useState } from "react"
|
||||
|
||||
import { env } from "@/env/client"
|
||||
@@ -14,7 +14,14 @@ function initializeTrpcClient() {
|
||||
// that trpc and next are running on the same port.
|
||||
return trpc.createClient({
|
||||
links: [
|
||||
loggerLink({
|
||||
enabled: (opts) =>
|
||||
(env.NEXT_PUBLIC_NODE_ENV === "development" &&
|
||||
typeof window !== "undefined") ||
|
||||
(opts.direction === "down" && opts.result instanceof Error),
|
||||
}),
|
||||
httpBatchLink({
|
||||
fetch,
|
||||
transformer,
|
||||
/**
|
||||
* This is locally in Next.js
|
||||
|
||||
Reference in New Issue
Block a user