- Wrap getDictionary with React cache to prevent redundant JSON parsing on the server - Create MotionProvider to globally initialize framer-motion LazyMotion with domAnimation - Replace standard 'motion' imports with 'm' across all animated client components (HomeClient, Navbar, GaleriClient, SSSClient, card, text-reveal) to drastically reduce First Load JS size
12 lines
246 B
TypeScript
12 lines
246 B
TypeScript
"use client";
|
|
|
|
import { LazyMotion, domAnimation } from "framer-motion";
|
|
|
|
export function MotionProvider({ children }: { children: React.ReactNode }) {
|
|
return (
|
|
<LazyMotion features={domAnimation}>
|
|
{children}
|
|
</LazyMotion>
|
|
);
|
|
}
|