fix: remove dynamic() imports for below-fold sections
All checks were successful
CI / CD / test-build (push) Successful in 11m5s
CI / CD / deploy-dev (push) Successful in 1m17s
CI / CD / deploy-production (push) Has been skipped

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>
This commit is contained in:
2026-03-04 22:02:05 +01:00
parent 08315433d1
commit 9ae6ada0a6

View File

@@ -6,7 +6,10 @@
*/ */
import { NextIntlClientProvider } from 'next-intl'; 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 { import type {
AboutTranslations, AboutTranslations,
ProjectsTranslations, ProjectsTranslations,
@@ -16,12 +19,6 @@ import type {
import enMessages from '@/messages/en.json'; import enMessages from '@/messages/en.json';
import deMessages from '@/messages/de.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 }; const messageMap = { en: enMessages, de: deMessages };
function getNormalizedLocale(locale: string): 'en' | 'de' { function getNormalizedLocale(locale: string): 'en' | 'de' {