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>
This commit is contained in:
@@ -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' {
|
||||||
|
|||||||
Reference in New Issue
Block a user