From 9ae6ada0a659c1911ebe879f09653b2d8f33f89c Mon Sep 17 00:00:00 2001 From: denshooter Date: Wed, 4 Mar 2026 22:02:05 +0100 Subject: [PATCH] fix: remove dynamic() imports for below-fold sections dynamic() caused Framer Motion's initial opacity:0 to be baked into SSR HTML, but client-side hydration never triggered the animations. Direct imports ensure Framer Motion properly takes over on hydration. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- app/components/ClientWrappers.tsx | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/app/components/ClientWrappers.tsx b/app/components/ClientWrappers.tsx index 45ea37e..5b943eb 100644 --- a/app/components/ClientWrappers.tsx +++ b/app/components/ClientWrappers.tsx @@ -6,7 +6,10 @@ */ import { NextIntlClientProvider } from 'next-intl'; -import dynamic from 'next/dynamic'; +import About from './About'; +import Projects from './Projects'; +import Contact from './Contact'; +import Footer from './Footer'; import type { AboutTranslations, ProjectsTranslations, @@ -16,12 +19,6 @@ import type { import enMessages from '@/messages/en.json'; import deMessages from '@/messages/de.json'; -// Lazy-load below-fold sections (code-split but still SSR) -const About = dynamic(() => import('./About')); -const Projects = dynamic(() => import('./Projects')); -const Contact = dynamic(() => import('./Contact')); -const Footer = dynamic(() => import('./Footer')); - const messageMap = { en: enMessages, de: deMessages }; function getNormalizedLocale(locale: string): 'en' | 'de' {