- Add 'force-dynamic' export to API routes using cookies/searchParams - Add 'force-dynamic' export to page components using dynamic features - Create proper error pages without i18n complexity - Fix "Dynamic server usage" errors during static generation Routes now properly marked as dynamic will render at request time instead of failing during build-time static generation. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
31 lines
No EOL
716 B
TypeScript
31 lines
No EOL
716 B
TypeScript
import { Metadata } from 'next'
|
|
import { getTranslations } from 'next-intl/server'
|
|
|
|
// Force dynamic rendering to avoid useContext issues during static generation
|
|
export const dynamic = 'force-dynamic'
|
|
import AboutPageClient from './AboutPageClient'
|
|
|
|
export async function generateMetadata({
|
|
params: { locale }
|
|
}: {
|
|
params: { locale: string }
|
|
}): Promise<Metadata> {
|
|
const t = await getTranslations({ locale, namespace: 'common' })
|
|
|
|
return {
|
|
title: t('page.titles.about'),
|
|
description: t('page.descriptions.about')
|
|
}
|
|
}
|
|
|
|
export default async function AboutPage({
|
|
params: { locale }
|
|
}: {
|
|
params: { locale: string }
|
|
}) {
|
|
return (
|
|
<div id="About">
|
|
<AboutPageClient />
|
|
</div>
|
|
)
|
|
} |