fix(i18n): prepare for Lokalise
This commit is contained in:
@@ -5,11 +5,13 @@ import { overview } from "@/constants/routes/myPages"
|
||||
import { getProfile } from "@/lib/trpc/memoizedRequests"
|
||||
|
||||
import { auth } from "@/auth"
|
||||
import { getIntl } from "@/i18n"
|
||||
import { getLang } from "@/i18n/serverContext"
|
||||
|
||||
export default async function ProtectedLayout({
|
||||
children,
|
||||
}: React.PropsWithChildren) {
|
||||
const intl = await getIntl()
|
||||
const session = await auth()
|
||||
/**
|
||||
* Fallback to make sure every route nested in the
|
||||
@@ -54,7 +56,7 @@ export default async function ProtectedLayout({
|
||||
console.error(`[layout:protected] unhandled user loading error`)
|
||||
break
|
||||
}
|
||||
return <p>Something went wrong!</p>
|
||||
return <p>{intl.formatMessage({ id: "Something went wrong!" })}</p>
|
||||
}
|
||||
|
||||
if (!user) {
|
||||
|
||||
Reference in New Issue
Block a user