why getRequestConfig function from request.ts is calling 2 times? #1975
Unanswered
gigi-beridze
asked this question in
Q&A
Replies: 1 comment
-
@amannn can u helpme ? |
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.
-
this is how my console logs looks like, first render its getting right language from layout and also in request.ts language is correct.. after its calling again and its undefined, becouse of undefined after its setting default language 'ka', why its calling 2 times?
i'm not using middleware.ts, also I don't want to use setRequestLocale() in every page and layout.. only in main language layout component..
request.ts?19:13 Server en request.ts 123 request.ts?20:21 Server en request.ts layout.tsx?21:61 Server lang layout en request.ts?19:13 Server undefined request.ts 123 request.ts?20:21 Server ka request.ts
`import { getRequestConfig } from "next-intl/server";
export default getRequestConfig(async ({ requestLocale }) => {
let locale = await requestLocale;
console.log(locale, 'request.ts 123')
});
`
Beta Was this translation helpful? Give feedback.
All reactions