From e2616ae0f73823118ccc2ece960a35770872eac9 Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Mon, 12 Jan 2026 16:18:03 +0000 Subject: [PATCH] Fix next-intl locale, remove wave animations, and unoptimize hero image Co-authored-by: dennis --- app/[locale]/layout.tsx | 6 ++++-- app/_ui/HomePage.tsx | 42 +++-------------------------------------- app/components/Hero.tsx | 4 ++++ 3 files changed, 11 insertions(+), 41 deletions(-) diff --git a/app/[locale]/layout.tsx b/app/[locale]/layout.tsx index f1bb807..24b1905 100644 --- a/app/[locale]/layout.tsx +++ b/app/[locale]/layout.tsx @@ -1,5 +1,5 @@ import { NextIntlClientProvider } from "next-intl"; -import { getMessages } from "next-intl/server"; +import { getMessages, setRequestLocale } from "next-intl/server"; import React from "react"; export default async function LocaleLayout({ @@ -10,7 +10,9 @@ export default async function LocaleLayout({ params: Promise<{ locale: string }>; }) { const { locale } = await params; - const messages = await getMessages({ locale }); + // Ensure next-intl actually uses the route segment locale for this request. + setRequestLocale(locale); + const messages = await getMessages(); return ( diff --git a/app/_ui/HomePage.tsx b/app/_ui/HomePage.tsx index 40ed916..55b28ba 100644 --- a/app/_ui/HomePage.tsx +++ b/app/_ui/HomePage.tsx @@ -66,21 +66,9 @@ export default function HomePage() { d="M0,64 C240,96 480,32 720,64 C960,96 1200,32 1440,64 L1440,120 L0,120 Z" fill="url(#gradient1)" initial={{ opacity: 0 }} - animate={{ - opacity: 1, - d: [ - "M0,64 C240,96 480,32 720,64 C960,96 1200,32 1440,64 L1440,120 L0,120 Z", - "M0,32 C240,64 480,96 720,32 C960,64 1200,96 1440,32 L1440,120 L0,120 Z", - "M0,64 C240,96 480,32 720,64 C960,96 1200,32 1440,64 L1440,120 L0,120 Z", - ], - }} + animate={{ opacity: 1 }} transition={{ opacity: { duration: 0.8, delay: 0.3 }, - d: { - duration: 12, - repeat: Infinity, - ease: "easeInOut", - }, }} /> @@ -106,21 +94,9 @@ export default function HomePage() { d="M0,32 C240,64 480,96 720,32 C960,64 1200,96 1440,32 L1440,120 L0,120 Z" fill="url(#gradient2)" initial={{ opacity: 0 }} - animate={{ - opacity: 1, - d: [ - "M0,32 C240,64 480,96 720,32 C960,64 1200,96 1440,32 L1440,120 L0,120 Z", - "M0,96 C240,32 480,64 720,96 C960,32 1200,64 1440,96 L1440,120 L0,120 Z", - "M0,32 C240,64 480,96 720,32 C960,64 1200,96 1440,32 L1440,120 L0,120 Z", - ], - }} + animate={{ opacity: 1 }} transition={{ opacity: { duration: 0.8, delay: 0.3 }, - d: { - duration: 14, - repeat: Infinity, - ease: "easeInOut", - }, }} /> @@ -146,21 +122,9 @@ export default function HomePage() { d="M0,96 C240,32 480,64 720,96 C960,32 1200,64 1440,96 L1440,120 L0,120 Z" fill="url(#gradient3)" initial={{ opacity: 0 }} - animate={{ - opacity: 1, - d: [ - "M0,96 C240,32 480,64 720,96 C960,32 1200,64 1440,96 L1440,120 L0,120 Z", - "M0,64 C240,96 480,32 720,64 C960,96 1200,32 1440,64 L1440,120 L0,120 Z", - "M0,96 C240,32 480,64 720,96 C960,32 1200,64 1440,96 L1440,120 L0,120 Z", - ], - }} + animate={{ opacity: 1 }} transition={{ opacity: { duration: 0.8, delay: 0.3 }, - d: { - duration: 16, - repeat: Infinity, - ease: "easeInOut", - }, }} /> diff --git a/app/components/Hero.tsx b/app/components/Hero.tsx index 89d12f6..9aea5b4 100644 --- a/app/components/Hero.tsx +++ b/app/components/Hero.tsx @@ -117,6 +117,10 @@ const Hero = () => { fill className="object-cover scale-105 hover:scale-[1.08] transition-transform duration-1000 ease-out" priority + // Next/Image optimizer is returning 400 for this file in some dev setups + // (seen as: "isn't a valid image ... received null"). Bypass optimization. + unoptimized + sizes="(max-width: 768px) 256px, 320px" /> {/* Glossy Overlay for Liquid Feel */}