fix: pass locale explicitly to Hero and force-dynamic on locale-sensitive API routes
- Hero.tsx: pass locale prop directly to getTranslations instead of relying on setRequestLocale async storage, which can be lost during Next.js RSC streaming - book-reviews route: replace revalidate=300 with force-dynamic to prevent cached English responses being served to German locale requests - content/page route: add runtime=nodejs and force-dynamic (was missing both, violating CLAUDE.md API route conventions) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -5,8 +5,8 @@ interface HeroProps {
|
||||
locale: string;
|
||||
}
|
||||
|
||||
export default async function Hero({ locale: _locale }: HeroProps) {
|
||||
const t = await getTranslations("home.hero");
|
||||
export default async function Hero({ locale }: HeroProps) {
|
||||
const t = await getTranslations({ locale, namespace: "home.hero" });
|
||||
|
||||
return (
|
||||
<section className="relative min-h-screen flex flex-col items-center justify-center bg-stone-50 dark:bg-stone-950 px-6 transition-colors duration-500">
|
||||
|
||||
Reference in New Issue
Block a user