1
0
mirror of https://github.com/theoludwig/theoludwig.git synced 2026-05-06 13:48:12 +02:00

build(deps): update Next.js to v15 and ESLint to v9

This commit is contained in:
2024-11-09 19:50:22 +01:00
parent 59153a7a69
commit 9e840b8dae
74 changed files with 3206 additions and 3749 deletions
+27
View File
@@ -0,0 +1,27 @@
import deepmerge from "deepmerge"
import type { AbstractIntlMessages } from "next-intl"
import { getRequestConfig } from "next-intl/server"
import type { Locale } from "@repo/utils/constants"
import { LOCALE_DEFAULT, LOCALES } from "@repo/utils/constants"
export default getRequestConfig(async ({ requestLocale }) => {
let locale = await requestLocale
if (!LOCALES.includes(locale as Locale)) {
locale = LOCALE_DEFAULT
}
const userMessages = (await import(`./translations/${locale}.json`)).default
const defaultMessages = (
await import(`./translations/${LOCALE_DEFAULT}.json`)
).default
const messages = deepmerge<AbstractIntlMessages>(
defaultMessages,
userMessages,
)
return {
locale,
messages,
}
})