Replies: 1 comment
-
Same here. I'm using fetch-next with
it also does not work |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
我在 app/layout 中定义了 Interceptor 但无效
I defined Interceptor in app/layout, but it doesn't work
`
import type { Metadata } from "next"
import "./globals.css"
import { client } from "@/service/gen/client.gen"
export const metadata: Metadata = {
title: "-",
description: "-",
}
async function myInterceptor(response) {
// do something
return response
}
// Supports async functions
client.interceptors.response.use(myInterceptor)
export default function RootLayout({
children,
}: Readonly<{
children: React.ReactNode
}>) {
return (
<body className={
antialiased
}>{children})
}
`
Beta Was this translation helpful? Give feedback.
All reactions