Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion app/[locale]/resources/page.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { getTranslations } from "next-intl/server"
import { getTranslations, setRequestLocale } from "next-intl/server"

import type { Lang, PageParams } from "@/lib/types"

Expand Down Expand Up @@ -35,6 +35,8 @@ const Page = async (props: { params: Promise<PageParams> }) => {
const params = await props.params
const { locale } = params

setRequestLocale(locale)

const t = await getTranslations("page-resources")

// Fetch data using the new data-layer functions (already cached)
Expand Down Expand Up @@ -237,6 +239,9 @@ export async function generateMetadata(props: {
const params = await props.params
const { locale } = params

// Set locale before next-intl APIs so on-demand renders stay static
setRequestLocale(locale)

const t = await getTranslations("page-resources")

return await getMetadata({
Expand Down
Loading